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.
OpenAILike model to access them by replacing the base_url.
from os import getenv
from phi.agent import Agent, RunResponse
from phi.model.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",
)
)
# Get the response in a variable
# run: RunResponse = agent.run("Share a 2 sentence horror story.")
# print(run.content)
# Print the response in the terminal
agent.print_response("Share a 2 sentence horror story.")
OpenAILike also support all the params of OpenAIChatWas this page helpful?