SyedHasanCronosPMC commited on
Commit
a5385c3
·
verified ·
1 Parent(s): d49f1a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,9 +20,9 @@ api_key = os.getenv("ANTHROPIC_API_KEY")
20
  if not api_key:
21
  raise ValueError("ANTHROPIC_API_KEY environment variable not set")
22
 
23
- # Load Claude 3.5 Sonnet model with explicit minimal parameters to avoid 'proxies' issue
24
  llm = ChatAnthropic(
25
- api_key=api_key,
26
  model="claude-3-5-sonnet-20240229"
27
  )
28
 
 
20
  if not api_key:
21
  raise ValueError("ANTHROPIC_API_KEY environment variable not set")
22
 
23
+ # Fix: Initialize ChatAnthropic correctly without any proxy settings
24
  llm = ChatAnthropic(
25
+ anthropic_api_key=api_key, # Changed from api_key to anthropic_api_key
26
  model="claude-3-5-sonnet-20240229"
27
  )
28