diff --git a/docs/docs/core/flow_def.mdx b/docs/docs/core/flow_def.mdx index 79a27dacb..bc0001b8d 100644 --- a/docs/docs/core/flow_def.mdx +++ b/docs/docs/core/flow_def.mdx @@ -40,7 +40,7 @@ def demo_flow_def(flow_builder: cocoindex.FlowBuilder, data_scope: cocoindex.Dat ... # Add the flow definition to the flow registry. -demo_flow = cocoindex.flow.add_flow_def("DemoFlow", demo_flow_def) +demo_flow = cocoindex.add_flow_def("DemoFlow", demo_flow_def) ``` In both cases, `demo_flow` will be an object with `cocoindex.Flow` class type. diff --git a/python/cocoindex/__init__.py b/python/cocoindex/__init__.py index 36acc5cd2..97a911a87 100644 --- a/python/cocoindex/__init__.py +++ b/python/cocoindex/__init__.py @@ -11,6 +11,7 @@ from .flow import flow_def from .flow import EvaluateAndDumpOptions, GeneratedField from .flow import FlowLiveUpdater, FlowLiveUpdaterOptions +from .flow import add_flow_def from .flow import update_all_flows_async, setup_all_flows, drop_all_flows from .lib import init, start_server, stop from .llm import LlmSpec, LlmApiType @@ -52,6 +53,7 @@ "GeneratedField", "FlowLiveUpdater", "FlowLiveUpdaterOptions", + "add_flow_def", "update_all_flows_async", "setup_all_flows", "drop_all_flows",