Merge branch 'logspace-ai:dev' into dev
This commit is contained in:
commit
943d3aa4a6
19 changed files with 167 additions and 171 deletions
|
|
@ -54,7 +54,7 @@ def instantiate_based_on_type(class_object, base_type, node_type, params):
|
|||
if base_type == "agents":
|
||||
return instantiate_agent(class_object, params)
|
||||
elif base_type == "prompts":
|
||||
return instantiate_prompt(class_object, node_type, params)
|
||||
return instantiate_prompt(node_type, class_object, params)
|
||||
elif base_type == "tools":
|
||||
return instantiate_tool(node_type, class_object, params)
|
||||
elif base_type == "toolkits":
|
||||
|
|
@ -77,7 +77,7 @@ def instantiate_agent(class_object, params):
|
|||
return load_agent_executor(class_object, params)
|
||||
|
||||
|
||||
def instantiate_prompt(class_object, node_type, params):
|
||||
def instantiate_prompt(node_type, class_object, params):
|
||||
if node_type == "ZeroShotPrompt":
|
||||
if "tools" not in params:
|
||||
params["tools"] = []
|
||||
|
|
@ -96,7 +96,7 @@ def instantiate_tool(node_type, class_object, params):
|
|||
raise ValueError("Function should be a string")
|
||||
elif node_type.lower() == "tool":
|
||||
return class_object(**params)
|
||||
return None # Or some other default action
|
||||
return class_object(**params)
|
||||
|
||||
|
||||
def instantiate_toolkit(node_type, class_object, params):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue