You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, are there plans to support models from x.ai?
This new grok-2-1212 release from this week make it very appealing and also I would like to put their free API credits to good use.
I see there is an option to write my own model subclass, but just checking first if someone going to do it.
One last question, what is the policy here for adding more APIs?
The text was updated successfully, but these errors were encountered:
According to this, https://docs.x.ai/api/integrations#openai-sdk
The x.ai integration works on either openai or anthropic sdks which would qualify it for inclusion in the docs only right?
For any other model that's just a custom URL and API key, we're happy to add a one-paragraph description
with a link and instructions on the URL to use
I got it working for a basic query with this:
model=OpenAIModel(
'grok-2-1212',
openai_client=AsyncOpenAI(base_url='https://api.x.ai/v1', api_key=os.environ['XAI_API_KEY']),
)
agent=Agent(model)
result=agent.run_sync('which model are you?')
print(result)
Although when passing result_type=SomeThing to the agent it will consistently fail the result validation with the following:
pydantic_ai.exceptions.UnexpectedModelBehavior: Exceeded maximum retries (1) for result validation
Hi, are there plans to support models from x.ai?
This new grok-2-1212 release from this week make it very appealing and also I would like to put their free API credits to good use.
I see there is an option to write my own model subclass, but just checking first if someone going to do it.
One last question, what is the policy here for adding more APIs?
The text was updated successfully, but these errors were encountered: