Skip to content

Commit

Permalink
[FIX][Agent][list_tool_schemas -> list_base_models]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye Gomez authored and Kye Gomez committed Jul 17, 2024
1 parent a811a81 commit 450a7b7
Show file tree
Hide file tree
Showing 30 changed files with 2,017 additions and 202 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ D_state.json
artifacts_six
artifacts_seven
swarms/__pycache__
artifacts
artifacts_once
transcript_generator.json
venv
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ agent = Agent(
output_type=tool_schema, # or dict, or str
metadata_output_type="json",
# List of schemas that the agent can handle
list_tool_schemas=[tool_schema],
list_base_models=[tool_schema],
function_calling_format_type="OpenAI",
function_calling_type="json", # or soon yaml
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pydantic import BaseModel, Field
from swarms import Anthropic
from swarms import OpenAIChat
from swarms import Agent


Expand Down Expand Up @@ -31,19 +31,19 @@ class Schema(BaseModel):
"Generate a person's information based on the following schema:"
),
# Set the tool schema to the JSON string -- this is the key difference
tool_schema=tool_schema,
llm=Anthropic(),
# tool_schema=tool_schema,
llm=OpenAIChat(),
max_loops=3,
autosave=True,
dashboard=False,
streaming_on=True,
verbose=True,
interactive=True,
# Set the output type to the tool schema which is a BaseModel
output_type=tool_schema, # or dict, or str
# output_type=tool_schema, # or dict, or str
metadata_output_type="json",
# List of schemas that the agent can handle
list_tool_schemas=[tool_schema],
list_base_models=[tool_schema],
function_calling_format_type="OpenAI",
function_calling_type="json", # or soon yaml
)
Expand Down
2 changes: 1 addition & 1 deletion docs/applications/business-analyst-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ agent = Agent(
output_type=tool_schema, # or dict, or str
metadata_output_type="json",
# List of schemas that the agent can handle
list_tool_schemas=[tool_schema],
list_base_models=[tool_schema],
function_calling_format_type="OpenAI",
function_calling_type="json", # or soon yaml
)
Expand Down
Loading

0 comments on commit 450a7b7

Please sign in to comment.