[AGENT][Agent API]

pull/522/head
Kye Gomez 7 months ago
parent ab82586afd
commit 4d963fa901

@ -29,7 +29,7 @@ This endpoint returns a list of available model names. It is useful for clients
```python ```python
import requests import requests
response = requests.get("http://localhost:8000/v1/models") response = requests.get("http://api.swarms.world/v1/models")
print(response.json()) print(response.json())
``` ```
@ -41,6 +41,8 @@ print(response.json())
**Response Model:** `AgentOutput` **Response Model:** `AgentOutput`
**URL:** `http://api.swarms.world/v1/agent/completions`
**Description:** **Description:**
This endpoint handles the completion request for an agent configured with the given input parameters. It processes the request and returns the completion results. This endpoint handles the completion request for an agent configured with the given input parameters. It processes the request and returns the completion results.
@ -139,7 +141,7 @@ class AgentInput(BaseModel):
task: str = None task: str = None
agent_input = AgentInput(task="Generate a summary of the provided text.") agent_input = AgentInput(task="Generate a summary of the provided text.")
response = requests.post("http://localhost:8000/v1/agent/completions", json=agent_input.dict()) response = requests.post("http://api.swarms.world/v1/agent/completions", json=agent_input.dict())
print(response.json()) print(response.json())
``` ```

Loading…
Cancel
Save