FunctionSchema.from_pydantic()
method with full Pydantic v2 support
Optional
types and complex type annotationsPydanticUndefined
to_openai()
method on FunctionSchema for OpenAI API format support
completions
and responses
API endpointsEventCallback
class for object-based callback handling
GraphEvent
objects instead of formatted stringsGraphEventType
enum for event type identificationtype
, identifier
, token
, and params
fieldsGraphCompileError
reportingGraphCompileError
during compilation to ensure predictable execution orderCallback
class is deprecated and will be removed in v0.1.0 - use EventCallback
insteadspecial_token_format
and token_format
parameters in EventCallback
exist for backwards compatibility but are deprecated and will be removed in v0.1.0StrEnum
with fallback implementationdefault_factory
in Pydantic field definitionsUnion
and Optional
add_node
, add_router
, add_edge
, set_callback
, set_state
, update_state
, reset_state
, set_start_node
, set_end_node
, compile
] can now be chainedCallback
class to top-level import, you can now import it with from graphai import Callback
GRAPHAI_LOG_LEVEL
for controlling log output level (DEBUG, INFO, WARNING, ERROR, CRITICAL)networkx
, matplotlib
, and colorlog
dependencies (note if using Graph.visualize
one of networkx
or matplotlib
must be installed)List[str]
-> list[str]
and Optional[list]
-> list | None
execute()
method for better control over callback instancesNodeProtocol
type definition for improved type safety and IDE supportset_callback()
method for customizing default callback classexecute()
method signature to accept optional callback
parameterself.callback
attributeType[Callback]