Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: chat endpoint fails when the agent has an integration tool #825

Open
1 task done
HamadaSalhab opened this issue Nov 10, 2024 · 0 comments
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@HamadaSalhab
Copy link
Contributor

📜 Description

When an integration tool is added to the model, and the chat endpoint is called, it returns a 500: Internal server error.

To reproduce:

agent = client.agents.create(name="test agent", about="", model="gpt-4o")

tool = client.agents.tools.create(
    agent_id=agent.id,
    **{
        "name": "weatherx",
        "type": "integration",
        "integration": {
            "provider": "weather",
            "setup": {
                "openweathermap_api_key": "OPENWEATHERMAP_API_KEY"
            }
        }
    }
)

session = client.sessions.create(agent=agent.id)
session.id

client.sessions.chat(
    session_id=session.id,
    messages=[
        {"role": "user", "content": "What is the weather in London?"}
    ],
    recall=False
)

Error log:

agents-api-multi-tenant-1      | litellm.exceptions.BadRequestError: litellm.BadRequestError: OpenAIException - Error code: 400 - {'error': {'message': 'litellm.BadRequestError: OpenAIException - Error code: 400 - {\'error\': {\'message\': "Invalid type for \'tools[0].function\': expected a function definition, but got null instead.", \'type\': \'invalid_request_error\', \'param\': \'tools[0].function\', \'code\': \'invalid_type\'}}\nReceived Model Group=gpt-4o\nAvailable Model Group Fallbacks=None', 'type': None, 'param': None, 'code': '400'}}

👟 Reproduction steps

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue
@HamadaSalhab HamadaSalhab added the bug Something isn't working label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants