Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
#
|
24 |
llm = ChatAnthropic(
|
25 |
-
|
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 |
|