AdalFlow icon indicating copy to clipboard operation
AdalFlow copied to clipboard

Improve AWS bedrock integration

Open ajithvcoder opened this issue 1 year ago • 7 comments

What does this PR do?

  1. Fixed existing issues due to aws_profile_name and aws_region_name
  2. Fixed issues in list_models() and added support to pass arguments for specific model fetching
  3. Fixed convert_inputs_to_api_kwargs() to accept model as modelId and max_tokens as maxTokens internally
  4. Add functionality to accept inferenceConfig and additionalModelRequestFields
  5. Added aws_bedrock.rst file for documentation
  6. Added tutorials\bedrock_client_simple_qa.py for showing usage example
  7. Now bedrock can be used as similar to other models tutorials\generator_all_providers.py

Fixes #283

Before submitting
  • [x] Was this discussed/agreed via a GitHub issue? (not for typos and docs)

  • [x] Did you read the contributor guideline? yes

  • [x] Did you make sure your PR does only one thing, instead of bundling different changes together?

  • [x] Did you make sure to update the documentation with your changes? (if necessary) Yes

  • [x] Did you write any new necessary tests? (not for typos and docs) Yes i have added mock tests and tutorials\bedrock_client_simple_qa.py

  • [x] Did you verify new and existing tests pass locally with your changes? Yes

  • [x] Did you list all the breaking changes introduced by this pull request? There is no breaking changes

ajithvcoder avatar Nov 30 '24 13:11 ajithvcoder

was literally about to make a PR to fix the list model method. Looks like you beat me to it.

lloydhamilton avatar Jan 11 '25 11:01 lloydhamilton

@ajithvcoder Hi, are you able to adapt this to work with this new PR for streaming in bedrock and also have no merge conflicts ?

fm1320 avatar Jan 21 '25 13:01 fm1320

@fm1320 it has been nearly 1.5 months so there are merge conflicts and will check the integration with this https://github.com/SylphAI-Inc/AdalFlow/pull/314 . I fix everything and update this by Jan 23.

ajithvcoder avatar Jan 21 '25 14:01 ajithvcoder

@ajithvcoder the tests i wrote in https://github.com/SylphAI-Inc/AdalFlow/pull/314 are an adaptation of yours. So it should just work with your code.

lloydhamilton avatar Jan 23 '25 10:01 lloydhamilton

@fm1320 the merge conflicts are fixed and #314 is already working fine as @lloydhamilton told.

ajithvcoder avatar Jan 24 '25 08:01 ajithvcoder

@fm1320 could you review and merge ? else merge conflicts may occur again

ajithvcoder avatar Feb 07 '25 04:02 ajithvcoder

Hi I would be curious if this PR can be merged

Fabrizib avatar Jul 19 '25 15:07 Fabrizib