Skip to content

Conversation

@elliotb
Copy link
Contributor

@elliotb elliotb commented Sep 27, 2024

The Google AI API now supports system instructions - https://ai.google.dev/gemini-api/docs/system-instructions?lang=rest

I've extracted the split_system_message function from ChatAnthropic and then handled processing the system message in the same way.

Copy link
Owner

@brainlid brainlid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I appreciate that you found an existing function and refactored it for reuse.

❤️💛💙💜

@brainlid brainlid merged commit f2e93ef into brainlid:main Sep 29, 2024
@elliotb elliotb deleted the google-system-instructions branch September 30, 2024 14:49
brainlid added a commit that referenced this pull request Oct 28, 2024
* 'main' of github.com:brainlid/langchain:
  Add AWS Bedrock support to ChatAnthropic (#154)
  Handle functions with no parameters for Google AI (#183)
  Handle missing token usage fields for Google AI (#184)
  Handle empty text parts from GoogleAI responses (#181)
  Support system instructions for Google AI (#182)
  feat: add OpenAI's new structured output API (#180)
  Support strict mode for tools (#173)
  Do not duplicate tool call parameters if they are identical (#174)
  🐛 cast tool_calls arguments correctly inside message_deltas (#175)
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