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

Breaking changes to allow custom generation options and multi-completions #28

Merged
merged 8 commits into from
Apr 16, 2024

Conversation

extremeheat
Copy link
Owner

@extremeheat extremeheat commented Apr 15, 2024

BREAKING:

  • CompletionService and GoogleAIStudioCompletionService
    • .requestCompletion now returns an array of completions

Non-brekaing:
.requestCompletion's options objects now also take in the following options:

    maxTokens: number
    temperature: number
    topP: number
    topK: number

Which will be passed to the model's generation options.

The constructors for CompletionService and GoogleAIStudioCompletionService have also been updated to take an additional objects object. These the object can contain a generationOptions dictionary that will be applied by default to all requestCompletion calls. You can override these options by passing them in individual requestCompletion calls.

Export a SafetyError object that can be used in instanceof checks to see if a model response failed due content filtering rules.

@extremeheat extremeheat merged commit 2d836f2 into main Apr 16, 2024
1 check passed
@extremeheat extremeheat deleted the studioupdate branch April 16, 2024 20:04
@extremeheat
Copy link
Owner Author

/makerelease

@github-actions github-actions bot mentioned this pull request Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant