Skip to content
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

[WIP] Add simple feature generation based on DSPy #35

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

huibinshen
Copy link
Collaborator

Issue #, if available:

Description of changes:

Adding simple DSPy based feature generation. Experiments results to follow.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@huibinshen huibinshen marked this pull request as draft October 15, 2024 15:21
def get_llm(model_str, kwargs) -> dspy.lm:
if model_str == "bedrock-claude-3.5-sonnet": # load credential from envrionment variables
return dspy.AWSAnthropic(
aws_provider=dspy.Bedrock(region_name=os.environ.get("AWS_DEFAULT_REGION")),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since AWS Bedrock is only available in US regions (e.g., us-east-1 or us-west-2):

Suggested change
aws_provider=dspy.Bedrock(region_name=os.environ.get("AWS_DEFAULT_REGION")),
aws_provider=dspy.Bedrock(region_name="us-west-2"),

)
elif model_str == "bedrock-claude-3-sonnet": # load credential from envrionment variables
return dspy.AWSAnthropic(
aws_provider=dspy.Bedrock(region_name=os.environ.get("AWS_DEFAULT_REGION")),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since AWS Bedrock is only available in US regions (e.g., us-east-1 or us-west-2):

Suggested change
aws_provider=dspy.Bedrock(region_name=os.environ.get("AWS_DEFAULT_REGION")),
aws_provider=dspy.Bedrock(region_name="us-west-2"),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants