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
completion = client.chat.completions.create(
model="openchat/openchat-7b:free",
messages=[
{
"role": "user",
"content": "Say this is a test",
},
],
)
You are allow to provide api_key by OPENAI_API_KEY and base_url by OPENAI_API_ENDPOINT.
But there should be also flexible way to list available models so that you can use them later in the settings.
Maybe even OpenAI API allows to retrieve list of models and this would be awsome to list them.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
Using LLM models provided by different companies with OpenAI API.
Describe the solution you'd like
For example there are LLM aggregators such as OpenRouter.
You can access it by OpenAI API. Here is an example:
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key=getenv("OPENROUTER_API_KEY"),
)
completion = client.chat.completions.create(
model="openchat/openchat-7b:free",
messages=[
{
"role": "user",
"content": "Say this is a test",
},
],
)
You are allow to provide api_key by OPENAI_API_KEY and base_url by OPENAI_API_ENDPOINT.
But there should be also flexible way to list available models so that you can use them later in the settings.
Maybe even OpenAI API allows to retrieve list of models and this would be awsome to list them.
Additional context
No response
The text was updated successfully, but these errors were encountered: