Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
VRSEN committed Apr 12, 2024
1 parent d921b64 commit 521e019
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,16 @@ Define your custom tools with [Instructor](https://github.com/jxnl/instructor):
from agency_swarm.tools import ToolFactory
# using local file
with open("schemas/your_schema.json") as f:
ToolFactory.from_openapi_schema(
tools = ToolFactory.from_openapi_schema(
f.read(),
)

# using requests
ToolFactory.from_openapi_schema(
tools = ToolFactory.from_openapi_schema(
requests.get("https://api.example.com/openapi.json").json(),
)
```


3. **Define Agent Roles**: Start by defining the roles of your agents. For example, a CEO agent for managing tasks and a developer agent for executing tasks.

```python
Expand All @@ -101,7 +100,7 @@ Define your custom tools with [Instructor](https://github.com/jxnl/instructor):
instructions="You must converse with other agents to ensure complete task execution.", # can be a file like ./instructions.md
files_folder="./files", # files to be uploaded to OpenAI
schemas_folder="./schemas", # OpenAPI schemas to be converted into tools
tools=[MyCustomTool, LangchainTool])
tools=[MyCustomTool])
```

Import from existing agents:
Expand Down

0 comments on commit 521e019

Please sign in to comment.