Skip to content

Commit be1699b

Browse files
authored
Merge pull request #3 from cloudshiftstrategies/feat/claude_37
feat(llm): Added Claude 3.7
2 parents a7b8ae4 + 4ab9703 commit be1699b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

channel_advisor_api/models/channel_advisor_llm.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
class Models(StrEnum):
2323
CLAUDE_3_5_SONNET_V2 = "us.anthropic.claude-3-5-sonnet-20241022-v2:0"
24+
CLAUDE_3_7_SONNET = "us.anthropic.claude-3-7-sonnet-20250219-v1:0"
2425

2526

2627
class BaseProductWithAttributes(BaseModel):
@@ -42,7 +43,11 @@ class ChildProductWithAttributes(ParentProductWithAttributes):
4243

4344

4445
def llm_product(
45-
product: MinProduct, is_parent: bool, xtra_context: Optional[str] = None, temperature: float = 0.7
46+
product: MinProduct,
47+
is_parent: bool,
48+
xtra_context: Optional[str] = None,
49+
temperature: float = 0.7,
50+
model: Models = Models.CLAUDE_3_7_SONNET,
4651
) -> BaseProductWithAttributes:
4752

4853
if is_parent:
@@ -84,7 +89,7 @@ def llm_product(
8489
try:
8590
# Make API call with retry logic
8691
product_with_attributes, completion = AwsClient().claude_client.completions.create_with_completion(
87-
model=Models.CLAUDE_3_5_SONNET_V2.value,
92+
model=model.value,
8893
max_tokens=1024 * 10,
8994
max_retries=2,
9095
messages=messages,

0 commit comments

Comments
 (0)