✨ Feature: Support Claude 3.5 8192 maximum output length.
Browse files- request.py +3 -1
request.py
CHANGED
@@ -240,11 +240,13 @@ async def gpt2claude_tools_json(json_dict):
|
|
240 |
return json_dict
|
241 |
|
242 |
async def get_claude_payload(request, engine, provider):
|
|
|
243 |
headers = {
|
244 |
"content-type": "application/json",
|
245 |
"x-api-key": f"{provider['api']}",
|
246 |
"anthropic-version": "2023-06-01",
|
247 |
-
"anthropic-beta": "tools-2024-05-16"
|
|
|
248 |
}
|
249 |
url = provider['base_url']
|
250 |
|
|
|
240 |
return json_dict
|
241 |
|
242 |
async def get_claude_payload(request, engine, provider):
|
243 |
+
model = provider['model'][request.model]
|
244 |
headers = {
|
245 |
"content-type": "application/json",
|
246 |
"x-api-key": f"{provider['api']}",
|
247 |
"anthropic-version": "2023-06-01",
|
248 |
+
"anthropic-beta": "max-tokens-3-5-sonnet-2024-07-15" if "claude-3-5-sonnet" in model else "tools-2024-05-16",
|
249 |
+
|
250 |
}
|
251 |
url = provider['base_url']
|
252 |
|