superagent-py
superagent-py copied to clipboard
AttributeError: 'Superagent' object has no attribute 'agents'
AttributeError Traceback (most recent call last)
[/Users/dekahalane/superagent-py/test.ipynb](https://file+.vscode-resource.vscode-cdn.net/Users/dekahalane/superagent-py/test.ipynb) Cell 1 line 6
[2](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=1) from superagent.client import Superagent
[4](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=3) client = Superagent(token="REMOVED FOR DEBUGGING", base_url="https://api.beta.superagent.sh/")
----> [6](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=5) agent = client.agents.create(request={
[7](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=6) "name": "My Agent",
[8](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=7) "description": "My awesome agent",
[9](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=8) "isActive": True,
[10](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=9) "llmModel": "GPT_4_0613"
[11](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=10) })
[13](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=12) output = client.agent.invoke(
[14](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=13) agent_id=agent.data.id,
[15](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=14) input="Hi there!",
[16](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=15) enable_streaming=False,
[17](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=16) session_id="123"
[18](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=17) )
[20](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=19) print("Received response from superagent", agent.data)
AttributeError: 'Superagent' object has no attribute 'agents'
I can't find the documentation to fix this error, I've tried both removing the agents
from client.agents.create
and just the s
as I thought it might be a typo but then it throws an InternalServerError