dspy
dspy copied to clipboard
feat(bedrock-lm): Added a LM for Bedrock and a base AWS LM class
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.
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)
Yep! I believe I removed that in the most recent commit? I tried to emulate the style used in the Azure Cognitive Services class.
Thanks so much James! Just made one change and merged