Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Update method signature

davidmezzetti2e26103244a5
diff --git a/src/python/txtai/api/base.py b/src/python/txtai/api/base.py
index e99aa36b..92ca8082 100644
--- a/src/python/txtai/api/base.py
+++ b/src/python/txtai/api/base.py
@@ -142,7 +142,7 @@ class API:
schedule = config.pop("schedule", None)
# Create workflow
- self.workflows[workflow] = WorkflowFactory.create(workflow, config)
+ self.workflows[workflow] = WorkflowFactory.create(config, workflow)
# Schedule job if necessary
if schedule:
diff --git a/src/python/txtai/workflow/factory.py b/src/python/txtai/workflow/factory.py
index 3ee776d1..b576902c 100644
--- a/src/python/txtai/workflow/factory.py
+++ b/src/python/txtai/workflow/factory.py
@@ -12,13 +12,13 @@ class WorkflowFactory:
"""
@staticmethod
- def create(name, config):
+ def create(config, name):
"""
Creates a new Workflow instance.
Args:
- name: Workflow name
config: Workflow configuration
+ name: Workflow name
Returns:
Workflow
@@ -33,4 +33,4 @@ class WorkflowFactory:
config["tasks"] = tasks
# Create workflow
- return Workflow(name=name, **config)
+ return Workflow(**config, name=name)