2.3:[BUG]提问乱码/答非所问 #3

This commit is contained in:
2024-07-22 13:24:04 +08:00
parent 0944aa1a85
commit aa8aadac49
6 changed files with 19 additions and 8 deletions

View File

@@ -148,9 +148,9 @@ public class CommandHandler implements CommandExecutor {
logger.info("Built request: " + json.toString());
HttpRequest request = HttpRequest.post(configManager.getBaseUrl() + "/chat/completions")
.header("Content-Type", "application/json")
.header("Content-Type", "application/json; charset=UTF-8")
.header("Authorization", "Bearer " + configManager.getApiKey())
.body(json.toString());
.bodyText(json.toString());
if (configManager.isDebugMode()) {
logger.info("Sending request to ChatGPT: " + request.toString());

View File

@@ -14,6 +14,7 @@ models:
- "gpt-4-turbo"
- "gpt-4-turbo-preview"
- "gpt-4o"
- "gpt-4o-mini"
# Google Gemini
# - "gemini-pro"
# - "gemini-1.5-pro"
@@ -24,8 +25,9 @@ models:
# The default model to use
default_model: "gpt-3.5-turbo"
conversation:
max_history_size: 10
# Continuous conversation switch
context_enabled: false
max_history_size: 10
# Message settings
messages:
reload: "&aConfiguration reloaded successfully!"
@@ -51,4 +53,4 @@ messages:
# If you don't know what this is, don't change it
debug: false
# DO NOT EDIT!!!!!
version: 2.2
version: 2.3

View File

@@ -14,6 +14,7 @@ models:
- "gpt-4-turbo"
- "gpt-4-turbo-preview"
- "gpt-4o"
- "gpt-4o-mini"
# Google Gemini
# - "gemini-pro"
# - "gemini-1.5-pro"
@@ -24,8 +25,9 @@ models:
# 默认使用的模型
default_model: "gpt-3.5-turbo"
conversation:
max_history_size: 10
# 连续对话开关
context_enabled: false
max_history_size: 10
# 消息相关设置
messages:
reload: "&a已重新加载配置文件"
@@ -51,4 +53,4 @@ messages:
# 如果你不知道这是什么,请不要动
debug: false
# 不要动!!!!!
version: 2.2
version: 2.3