Skip to content

fix: when calling tools on xai provider with no parameters causing an api error#950

Open
ewanwalk wants to merge 1 commit intoprism-php:mainfrom
ewanwalk:fix-xai-provider
Open

fix: when calling tools on xai provider with no parameters causing an api error#950
ewanwalk wants to merge 1 commit intoprism-php:mainfrom
ewanwalk:fix-xai-provider

Conversation

@ewanwalk
Copy link

Description

I encountered an issue when trying to test the xAI provider where:

  1. I was trying to call text/stream
  2. I was providing tools that both had parameters and did not have parameters

When providing a tool with no parameters I observed the following API response:

{
  "code": "Client specified an invalid argument",
  "error": "Invalid request content: Schema validation failed: [standard_violation] /properties: [] is not of type "object""
}

The fix is to just return a default object instead of empty array for properties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants