Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ErykCh opened this issue Feb 14, 2024 · 2 comments
Open

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

ErykCh opened this issue Feb 14, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ErykCh
Copy link

ErykCh commented Feb 14, 2024

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

@ErykCh ErykCh added the enhancement New feature or request label Feb 14, 2024
@tianzhou
Copy link
Contributor

Contribution welcome

@tianzhou tianzhou added the help wanted Extra attention is needed label Feb 14, 2024
@willkrakow
Copy link

Created a PR for this #154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants