feat: update requester config logic

This commit is contained in:
Junyan Qin
2025-03-16 23:16:06 +08:00
parent 5c584ee60d
commit 3124cc0fef
12 changed files with 104 additions and 86 deletions
@@ -8,6 +8,7 @@ import base64
import anthropic
import httpx
from ....core import app
from .. import entities, errors, requester
from .. import entities, errors
@@ -22,6 +23,11 @@ class AnthropicMessages(requester.LLMAPIRequester):
client: anthropic.AsyncAnthropic
default_config: dict[str, typing.Any] = {
'base-url': 'https://api.anthropic.com/v1',
'timeout': 120,
}
async def initialize(self):
httpx_client = anthropic._base_client.AsyncHttpxClientWrapper(