OpenAILike model to access them by replacing the base_url.
Example
Params
OpenAILike also support all the params of OpenAIChatDocumentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
Learn how to use OpenAI-like models in Agno.
OpenAILike model to access them by replacing the base_url.
from os import getenv
from agno.agent import Agent, RunResponse
from agno.models.openai.like import OpenAILike
agent = Agent(
model=OpenAILike(
id="mistralai/Mixtral-8x7B-Instruct-v0.1",
api_key=getenv("TOGETHER_API_KEY"),
base_url="https://api.together.xyz/v1",
)
)
# Print the response in the terminal
agent.print_response("Share a 2 sentence horror story.")
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "not-provided" | The name of the model to be used for generating responses. |
name | str | "OpenAILike" | The name of this chat model instance. |
api_key | str | "not-provided" | The API key for authenticating requests to the service. |
override_system_role | bool | False | Whether to override the default system role. |
system_message_role | str | "system" | The role to use for system messages. |
OpenAILike also support all the params of OpenAIChatWas this page helpful?