Skip to content

Commit 2150e4b

Browse files
committed
trip data improvements; caching
1 parent 2436f3a commit 2150e4b

3 files changed

Lines changed: 216 additions & 100 deletions

File tree

app/tasks/enrich_product.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def get_session():
5353
# AI client
5454
# ---------------------------------------------------------------------------
5555

56-
DEFAULT_MODEL = "claude-sonnet-4-6"
56+
DEFAULT_MODEL = "claude-sonnet-5"
5757
_client = None
5858

5959

@@ -67,10 +67,11 @@ def _get_ai_client() -> anthropic.Anthropic:
6767
return _client
6868

6969

70-
def ai_complete(system: str, user: str, tools: list | None = None, max_retries: int = 3):
70+
def ai_complete(system: str, user: str, tools: list | None = None, max_retries: int = 3,
71+
model: str | None = None):
7172
client = _get_ai_client()
7273
kwargs = dict(
73-
model=DEFAULT_MODEL,
74+
model=model or DEFAULT_MODEL,
7475
max_tokens=4096,
7576
system=system,
7677
messages=[{"role": "user", "content": user}],

0 commit comments

Comments
 (0)