-
Notifications
You must be signed in to change notification settings - Fork 128
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 AnthropicVertexChatGenerator component #1192
Conversation
self.region = region or os.environ.get("REGION") | ||
self.project_id = project_id or os.environ.get("PROJECT_ID") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be Secret
s I think. If you do it like this you can leak them when serializing the component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case project_id
and region
do not grant access to GCP resources on their own, as proper authentication and permissions are required. So I thought these values are not sensitive data; but more of configuration parameters. Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, we treated them as secrets on some other components though. Good for me to change this.
In any case I would make them mandatory arguments. If the user wants to pass them as env vars that's up to them.
...opic/src/haystack_integrations/components/generators/anthropic/chat/vertex_chat_generator.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 👏
* Created a model adapter * Create adapter class and add VertexAPI * Add chat generator for Anthropic Vertex * Add tests * Small fix * Improve doc_strings * Make project_id and region mandatory params * Small fix
Related Issues
Proposed Changes:
AnthropicVertexChatGenerator
class that inherits fromAnthropicChatGenerator
api_key
with parameters needed forAnthropicVertex
How did you test it?
Notes for the reviewer
A documentation will be created for this component
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.