-
Notifications
You must be signed in to change notification settings - Fork 285
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: Add model listing #4948
feat: Add model listing #4948
Conversation
async def model_providers( | ||
self, vendors: List[str], info: Info[Context, None] | ||
) -> List[ModelProvider]: | ||
all_vendors = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pythony question is there any reason to define this constant inside of a function instead of statically somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it could be hoisted. But probably needs a refactor anyway
) -> List[ModelProvider]: | ||
all_vendors = { | ||
"OpenAI": ModelProvider( # https://platform.openai.com/docs/models | ||
name="OpenAI", # currently only models using the chat completions API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this will have to be a graphql input param, it might make more sense to start with the vendor being a graphql enum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will have to iterate on this so let's just merge and be open to things changing.
cf18e34
to
5990585
Compare
04e681c
to
a3d2a4e
Compare
* Add query for model providers * gql build * Hardcode all models for now
partially resolves #4858
Adds amodel_providers
query that lists available models given a specific provider as an input. This is currently incomplete, as I plan to add a DB-backed store for snapshotted models. I think it feels too bad to tie model definitions to the server version.Hardcodes all models for now