Skip to content

How to set the list of models that can be used #150

@ErykCh

Description

@ErykCh

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.
image

Maybe even OpenAI API allows to retrieve list of models and this would be awsome to list them.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions