-
Notifications
You must be signed in to change notification settings - Fork 731
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
feat: update aws_bedrock #1194
base: master
Are you sure you want to change the base?
feat: update aws_bedrock #1194
Conversation
Hi Shengsong, thanks for your contributing. Please update the Camel license in the code. |
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.
Thanks @Asher-hss ! Could you take a look at https://github.com/aws-samples/bedrock-access-gateway and verify whether we can use it to do a more simple integration? This would be more easier for us to maintain it if it works
tool_choice (Union[dict[str, str], str], optional): The tool choice. | ||
""" | ||
|
||
max_tokens: Optional[int] = 400 |
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.
400 token is quiet limited, could we set this to None
?
maxTokens (int, optional): The maximum number of tokens. | ||
temperatue (float, optional): Controls the randomness of the output. | ||
top_p (float, optional): Use nucleus sampling. | ||
top_k (int, optional): Use top-k sampling. | ||
tool_choice (Union[dict[str, str], str], optional): The tool choice. |
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.
any reference link to AWS bedrock parameters? It seems the supported parameters are quite limited
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.
https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InferenceConfiguration.html
Hi wendong,this is the reference link about aws bedrock parameters
I think we're good to go, interacting through OpenAI's client, which will be more beneficial for future maintenance. |
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.
Hi @Asher-hss , left some comments below
api_key (Optional[str], optional): This parameter is not used. | ||
url (Optional[str], optional): This parameter is not used. |
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.
api_key (Optional[str], optional): This parameter is not used. | |
url (Optional[str], optional): This parameter is not used. | |
api_key (str, optional): This parameter is not used. | |
url (str, optional): This parameter is not used. |
Corrected parameter type descriptions, and the purpose of these two parameters.
api_key: Optional[str] = None, | ||
url: Optional[str] = None, | ||
token_counter: Optional[BaseTokenCounter] = None, | ||
region_name: Optional[str] = "eu-west-2", |
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.
region_name: Optional[str] = "eu-west-2", | |
region_name: Optional[str] = "eu-west-2", | |
**kwargs: Any, |
How about adding **kwargs
, which can add some customizable items to boto3.client
initialization
service_name='bedrock-runtime', | ||
region_name=region_name, | ||
aws_access_key_id=access_key_id, | ||
aws_secret_access_key=secret_access_key, |
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.
aws_secret_access_key=secret_access_key, | |
aws_secret_access_key=secret_access_key, | |
**kwargs, |
|
||
model = ModelFactory.create( | ||
model_platform=ModelPlatformType.AWS_BEDROCK, | ||
model_type="meta.llama3-70b-instruct-v1:0", |
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.
Add values in camel.types.enums.ModelType
Description
#1174
Motivation and Context
#1174
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Implemented Tasks
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!