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

Bring back AI models as const #2113

Open
demosjarco opened this issue May 10, 2024 · 2 comments
Open

Bring back AI models as const #2113

demosjarco opened this issue May 10, 2024 · 2 comments
Assignees
Labels
types Related to @cloudflare/workers-types

Comments

@demosjarco
Copy link

In commit 7f3789c, modelMappings was removed and replaced by creating union types directly in the argument in the run() overloads. This removes the ability to get the models available at runtime.

Also putting the model names directly inline to each overload makes it difficult to retrieve the models for a task type outside of the run() method vs. externalizing each one individually (or as part of a namespace or other grouping method).

@demosjarco demosjarco added the types Related to @cloudflare/workers-types label May 10, 2024
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk May 10, 2024
@CarmenPopoviciu
Copy link
Contributor

@G4brym might have more insight into this?

@G4brym
Copy link
Member

G4brym commented Jul 16, 2024

Hey @demosjarco maintaining a list of all models in code is difficult, as we are always adding new models and updating the inputs.
We decided to remove modelMappings and instead add api endpoints to will always have the most up to date informations.
We recommend users to get the list of models from this api endpoint, you can also retrieve the model input/output schema from this api endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types Related to @cloudflare/workers-types
Projects
None yet
Development

No branches or pull requests

4 participants