Welcome to Portkey Forum

s
s44002
Offline, last seen last week
Joined November 27, 2024
Exception has occurred: ValidationError
1 validation error for ChatCompletions
choices.0.message.tool_calls.1
Input should be a valid dictionary or instance of ChatCompletionMessageToolCall [type=model_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.10/v/model_type
File "C:\Users\shreyas\Music\Cenzex\CityInsider\proto_agent_portkey.py", line 301, in trigger
response: ChatCompletion = await self.async_client.chat.completions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\shreyas\Music\Cenzex\CityInsider\proto_agent_portkey.py", line 420, in ask_question
return await self.trigger()
File "C:\Users\shreyas\Music\Cenzex\CityInsider\interface.py", line 80, in websocket_endpoint
response = await instance.ask_question(message["data"])
File "C:\Users\shreyas\Music\Cenzex\CityInsider\main.py", line 8, in <module>
uvicorn.run(app, port=7005, factory=False)
pydantic_core._pydantic_core.ValidationError: 1 validation error for ChatCompletions
choices.0.message.tool_calls.1
Input should be a valid dictionary or instance of ChatCompletionMessageToolCall [type=model_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.10/v/model_type ...
49 comments
s
G
b
he has a fair point though, gemini, anthropic and all others support tool responses being images and so on, how do we accomodate for that at the gatewat level
19 comments
s
V
r
[
{
"role": "system",
"content": "My System Prompt"
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "when does the flight from baroda to bangalore land tomorrow, what time, what is its flight number, and what is its baggage belt?"
}
]
},
{
"role": "assistant",
"content": [
{
"type": "tool_use",
"id": "toolu_018fPMpEdPiCjkK8AkfCXgLh",
"name": "send_message_to_agent",
"input": {
"agent_name": "aggreg-agent",
"message": "WHAT: flight information from Baroda to Bangalore for tomorrow\nWHEN: tomorrow\nWHERE: Baroda to Bangalore"
}
}
]
},
{
"role": "user",
"content": [
{
"content": "tool call successful",
"type": "tool_result",
"tool_use_id": "toolu_018fPMpEdPiCjkK8AkfCXgLh"
}
]
}
]
34 comments
V
s
G
d
One interesting question
how can i use google context caching feature with this
3 comments
W
s
to use prompt caching by anthropic, do we just include the promptcaching cache type ephemeral as they have specified??
2 comments
V
s
Not able to create virtual Keys
41 comments
W
s