dspy icon indicating copy to clipboard operation
dspy copied to clipboard

feat(bedrock-lm): Added a LM for Bedrock and a base AWS LM class

Open JamesScharf opened this issue 1 year ago • 2 comments

Created two new LM classes:

  • Bedrock
  • AWSLM

Bedrock can be used with any Bedrock model once you have configured your AWS credentials with the AWS CLI. AWSLM exists so that we can add support for AWS Sagemaker in the future, which has a very similar API with minor parameter differences.

JamesScharf avatar Feb 02 '24 17:02 JamesScharf

Thank you! Looks good overall but please don't add a dependency in the main imports.

If you want to import something not in requirements, basically import it inside the class methods. That way it will basically crash only for those it needs to crash for (i.e., people who need the new class but don't have the right dependencies)

okhat avatar Feb 03 '24 18:02 okhat

Yep! I believe I removed that in the most recent commit? I tried to emulate the style used in the Azure Cognitive Services class.

JamesScharf avatar Feb 03 '24 21:02 JamesScharf

Thanks so much James! Just made one change and merged

okhat avatar Feb 04 '24 21:02 okhat