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

feat: pull model list for openai-compatible endpoints #630

Merged
merged 10 commits into from
Dec 22, 2023
Merged

Conversation

cpacker
Copy link
Collaborator

@cpacker cpacker commented Dec 16, 2023

Closes #592

Please describe the purpose of this pull request.

  • During memgpt configure if using an openai endpoint, pull the list of models
  • Also, allow users to choose a "enter yourself" custom option (useful for custom OpenAI compatible endpoints)

How to test

Run memgpt configure

OpenAI
image

Azure
image

vLLM
image

Have you tested this PR?

  • Tested on OpenAI
  • Tested on Azure OpenAI
  • Tested on vLLM

Other comments

@sarahwooders

  • I'm concerned for some users the total amount of models is information overload (see screenshot).
  • Also, this is even after filtering for models only prefixed by gpt-
  • Additionally, there are models in the list that are misleading to show (eg gpt-4-vision-preview shows up, but we don't support vision inputs at the moment)

Copy link
Collaborator

@sarahwooders sarahwooders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also call the same function for the case where vllm is the endpoint type? e.g. with our endpoint you can do http://api.memgpt.ai/v1/models (since we require the OpenAI compatible vLLM endpoint).

Also might be nice to add Azure too, but not that important.

memgpt/cli/cli_config.py Outdated Show resolved Hide resolved
@cpacker
Copy link
Collaborator Author

cpacker commented Dec 16, 2023

Could you also call the same function for the case where vllm is the endpoint type? e.g. with our endpoint you can do http://api.memgpt.ai/v1/models (since we require the OpenAI compatible vLLM endpoint).

Also might be nice to add Azure too, but not that important.

Added vLLM support + tested against our vLLM API (see picture in OP)

@cpacker cpacker changed the title Pull model list feat: pull model list Dec 16, 2023
@cpacker cpacker changed the title feat: pull model list feat: pull model list for openai-compatible endpoints Dec 16, 2023
@cpacker cpacker added the priority Merge ASAP label Dec 21, 2023
@cpacker
Copy link
Collaborator Author

cpacker commented Dec 22, 2023

@sarahwooders added a new method to resolve the "too many models" problem:

Start by showing a curated list:
image

Allow the user to expand the list (if they expand the list, they get a warning):
image

Finally, they can still enter a manual model if the internet / GET request is broken and they know what they're doing:
image

Copy link
Collaborator

@sarahwooders sarahwooders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@cpacker cpacker merged commit b97064e into main Dec 22, 2023
3 checks passed
@cpacker cpacker deleted the pull-model-list branch December 22, 2023 07:27
sarahwooders pushed a commit that referenced this pull request Dec 26, 2023
* allow entering custom model name when using openai/azure

* pull models from endpoint

* added/tested vllm and azure

* no print

* make red

* make the endpoint question give you an opportunity to enter your openai api key again in case you made a mitake / want to swap it out

* add cascading workflow for openai+azure model listings

* patched bug w/ azure listing
norton120 pushed a commit to norton120/MemGPT that referenced this pull request Feb 15, 2024
* allow entering custom model name when using openai/azure

* pull models from endpoint

* added/tested vllm and azure

* no print

* make red

* make the endpoint question give you an opportunity to enter your openai api key again in case you made a mitake / want to swap it out

* add cascading workflow for openai+azure model listings

* patched bug w/ azure listing
mattzh72 pushed a commit that referenced this pull request Oct 9, 2024
* allow entering custom model name when using openai/azure

* pull models from endpoint

* added/tested vllm and azure

* no print

* make red

* make the endpoint question give you an opportunity to enter your openai api key again in case you made a mitake / want to swap it out

* add cascading workflow for openai+azure model listings

* patched bug w/ azure listing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority Merge ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List models options with /models for OpenAI compatible endpoints
2 participants