Skip to content

Commit 5be5a82

Browse files
committed
Added DeepSeek API support
1 parent 5d96f68 commit 5be5a82

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

samp-chatbot.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#define GEMINI_AI 1
55
#define LLAMA 2
66
#define DOUBAO 3
7+
#define DEEPSEEK 4
78

89
#define W1252 0
910
#define GB2312 1

src/ChatBotHelper.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ curl_slist* ChatBotHelper::GetHeader(const ChatBotParams& params)
2525

2626
switch (params.botType)
2727
{
28+
case DEEPSEEK:
2829
case DOUBAO:
2930
case GPT:
3031
case LLAMA:
@@ -50,7 +51,9 @@ std::string ChatBotHelper::GetURL(const ChatBotParams& params)
5051
case LLAMA:
5152
return "https://api.groq.com/openai/v1/chat/completions";
5253
case DOUBAO:
53-
return "https://ark.cn-beijing.volces.com/api/v3/chat/completions";
54+
return "https://ark.cn-beijing.volces.com/api/v3/chat/completions";
55+
case DEEPSEEK:
56+
return "https://api.deepseek.com/chat/completions";
5457
}
5558

5659
return "";
@@ -63,6 +66,7 @@ json ChatBotHelper::CreateRequestDocument(const std::string request, const ChatB
6366

6467
switch (params.botType)
6568
{
69+
case DEEPSEEK:
6670
case DOUBAO:
6771
case LLAMA:
6872
case GPT:
@@ -189,6 +193,7 @@ std::string ChatBotHelper::GetBotAnswer(const ChatBotParams& params, nlohmann::j
189193

190194
switch (params.botType)
191195
{
196+
case DEEPSEEK:
192197
case DOUBAO:
193198
case LLAMA:
194199
case GPT:

src/ChatBotHelper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ enum ChatBots
1313
GEMINI,
1414
LLAMA,
1515
DOUBAO,
16+
DEEPSEEK,
1617
NUM_CHAT_BOTS
1718
};
1819

src/SampHelper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#define PLUGIN_VERSION "v1.7"
3+
#define PLUGIN_VERSION "v1.7.5"
44

55
#include <sdk/plugin.h>
66
#include <set>

0 commit comments

Comments
 (0)