mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-09 03:09:34 +00:00
perf: deepseek
This commit is contained in:
@@ -41,16 +41,21 @@ class ChatAITestingAPI(GenericAPIView):
|
||||
data={'msg': _('Chat AI is not enabled')}
|
||||
)
|
||||
|
||||
proxy = config['GPT_PROXY']
|
||||
tp = config['CHAT_AI_TYPE']
|
||||
if tp == ChatAITypeChoices.gpt:
|
||||
url = config['GPT_BASE_URL']
|
||||
api_key = config['GPT_API_KEY']
|
||||
proxy = config['GPT_PROXY']
|
||||
model = config['GPT_MODEL']
|
||||
else:
|
||||
url = config['DEEPSEEK_BASE_URL']
|
||||
api_key = config['DEEPSEEK_API_KEY']
|
||||
proxy = config['DEEPSEEK_PROXY']
|
||||
model = config['DEEPSEEK_MODEL']
|
||||
|
||||
kwargs = {
|
||||
'base_url': config['GPT_BASE_URL'] or None,
|
||||
'api_key': config['GPT_API_KEY'],
|
||||
'base_url': url or None,
|
||||
'api_key': api_key,
|
||||
}
|
||||
try:
|
||||
if proxy:
|
||||
|
Reference in New Issue
Block a user