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

Model Registry non-standard parameters #2270

Closed
crtnx opened this issue Jul 13, 2024 · 1 comment
Closed

Model Registry non-standard parameters #2270

crtnx opened this issue Jul 13, 2024 · 1 comment
Labels
ai/core enhancement New feature or request

Comments

@crtnx
Copy link

crtnx commented Jul 13, 2024

Feature Description

The current implementation of experimental model registry doesn't allow any parameters except a model id. There is no way to pass optional non-standard parameters to a model, like topK. The change should be simple enough (just for illustration):

languageModel(id: string, options: any): LanguageModel {
    const [providerId, modelId] = this.splitId(id);
    const model = this.getProvider(providerId).languageModel?.(modelId, options);

    if (model == null) {
      throw new NoSuchModelError({ modelId: id, modelType: 'language model' });
    }

    return model;
  }

Use Case

No response

Additional context

No response

@lgrammel lgrammel added enhancement New feature or request ai/core labels Jul 15, 2024
@lgrammel
Copy link
Collaborator

lgrammel commented Sep 3, 2024

You can now use custom providers for this purpose:

In the future, we may add support for provider-specific options on the request level (AI functions parameter) as well.

@lgrammel lgrammel closed this as completed Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants