pull/478/head
Kye Gomez 8 months ago
parent b4f923f1fb
commit 3f1d078dd9

@ -109,7 +109,7 @@ print(out)
An LLM equipped with long term memory and tools, a full stack agent capable of automating all and any digital tasks given a good prompt. An LLM equipped with long term memory and tools, a full stack agent capable of automating all and any digital tasks given a good prompt.
```python ```python
from swarms import Agent, ChromaDB, OpenAIChat, tool from swarms import Agent, ChromaDB, OpenAIChat
# Making an instance of the ChromaDB class # Making an instance of the ChromaDB class
memory = ChromaDB( memory = ChromaDB(
@ -120,7 +120,6 @@ memory = ChromaDB(
) )
# Initialize a tool # Initialize a tool
@tool
def search_api(query: str): def search_api(query: str):
# Add your logic here # Add your logic here
return query return query
@ -185,7 +184,7 @@ Implementation of Devil in less than 90 lines of code with several tools:
terminal, browser, and edit files! terminal, browser, and edit files!
```python ```python
from swarms import Agent, Anthropic, tool from swarms import Agent, Anthropic
import subprocess import subprocess
# Model # Model
@ -194,7 +193,6 @@ llm = Anthropic(
) )
# Tools # Tools
@tool
def terminal( def terminal(
code: str, code: str,
): ):
@ -212,8 +210,6 @@ def terminal(
).stdout ).stdout
return str(out) return str(out)
@tool
def browser(query: str): def browser(query: str):
""" """
Search the query in the browser with the `browser` tool. Search the query in the browser with the `browser` tool.
@ -230,7 +226,6 @@ def browser(query: str):
webbrowser.open(url) webbrowser.open(url)
return f"Searching for {query} in the browser." return f"Searching for {query} in the browser."
@tool
def create_file(file_path: str, content: str): def create_file(file_path: str, content: str):
""" """
Create a file using the file editor tool. Create a file using the file editor tool.
@ -246,7 +241,6 @@ def create_file(file_path: str, content: str):
file.write(content) file.write(content)
return f"File {file_path} created successfully." return f"File {file_path} created successfully."
@tool
def file_editor(file_path: str, mode: str, content: str): def file_editor(file_path: str, mode: str, content: str):
""" """
Edit a file using the file editor tool. Edit a file using the file editor tool.
@ -1109,6 +1103,14 @@ print(output)
Coming soon... Coming soon...
## `AgentLoadBalancer`
Coming soon...
## `GraphSwarm`
Coming soon...
--- ---
## Documentation ## Documentation

Loading…
Cancel
Save