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

Add support for system instructions #119

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Add support for system instructions #119

merged 1 commit into from
Apr 11, 2024

Conversation

natebosch
Copy link
Collaborator

  • Add a systemInstruction constructor argument on GenerativeModel.
    Accept the Content type instead of a String to directly match the
    REST API and to avoid breaking changes if the backend gains the
    flexibility to honor more than a single TextPart for system
    instructions.
  • Add a Content.system utility with the single string argument to
    match the usage which works with the backend today.

- Add a `systemInstruction` constructor argument on `GenerativeModel`.
  Accept the `Content` type instead of a String to directly match the
  REST API and to avoid breaking changes if the backend gains the
  flexibility to honor more than a single TextPart for system
  instructions.
- Add a `Content.system` utility with the single string argument to
  match the usage which works with the backend today.
@natebosch natebosch merged commit dbc812b into main Apr 11, 2024
7 checks passed
@natebosch natebosch deleted the system-instruction branch April 11, 2024 22:40
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.

2 participants