feat: release 2.0.3

This commit is contained in:
zhayujie
2026-03-18 15:40:49 +08:00
parent 289989d9f7
commit 8993e8ad3e
11 changed files with 121 additions and 79 deletions

View File

@@ -30,11 +30,20 @@ user_session = dict()
class ClaudeAPIBot(Bot, OpenAIImage):
def __init__(self):
super().__init__()
self.api_key = conf().get("claude_api_key")
self.api_base = conf().get("claude_api_base") or "https://api.anthropic.com/v1"
self.proxy = conf().get("proxy", None)
self.sessions = SessionManager(BaiduWenxinSession, model=conf().get("model") or "text-davinci-003")
@property
def api_key(self):
return conf().get("claude_api_key")
@property
def api_base(self):
return conf().get("claude_api_base") or "https://api.anthropic.com/v1"
@property
def proxy(self):
return conf().get("proxy", None)
def reply(self, query, context=None):
# acquire reply content
if context and context.type: