更换okhttp为apache httpclient,尝试减少插件体积

This commit is contained in:
2024-07-12 19:04:05 +08:00
parent 2b79f0e1e8
commit 65665d88df
9 changed files with 174 additions and 96 deletions

View File

@@ -9,22 +9,33 @@ api:
models:
# OpenAI ChatGPT
- "gpt-3.5-turbo"
- "gpt-3.5-turbo-instruct"
- "gpt-4"
- "gpt-4-turbo"
- "gpt-4-turbo-preview"
- "gpt-4o"
# Google Gemini
# - "gemini-pro"
# - "gemini-1.5-pro"
# Anthropic Claude
# - "claude-3-opus"
# - "claude-3-5-sonnet"
# And more...
# The default model to use
default_model: "gpt-3.5-turbo"
# Message settings
messages:
reload: "Configuration reloaded successfully!"
help: "===== MineChatGPT Help ====="
help_ask: "/chatgpt <text> - Ask ChatGPT a question."
help_reload: "/chatgpt reload - Reload the configuration file."
help_model: "/chatgpt model <model_name> - Switch to a different model."
help_modellist: "/chatgpt modellist - List available models."
usage: "Usage: /chatgpt model <model_name>"
model_switch: "Model switched to %s"
chatgpt_error: "Failed to contact ChatGPT."
chatgpt_response: "ChatGPT: %s"
question: "Question: %s"
invalid_model: "Invalid model. Use /chatgpt modellist to see available models."
available_models: "Available models:"
no_permission: "You do not have permission to use this command. Required permission: %s"
reload: "&aConfiguration reloaded successfully!"
help: "&e===== MineChatGPT Help ====="
help_ask: "&e/chatgpt <text> - Ask ChatGPT a question."
help_reload: "&e/chatgpt reload - Reload the configuration file."
help_model: "&e/chatgpt model <model_name> - Switch to a different model."
help_modellist: "&e/chatgpt modellist - List available models."
usage: "&cUsage: /chatgpt model <model_name>"
model_switch: "&aModel switched to %s"
chatgpt_error: "&cFailed to contact ChatGPT."
chatgpt_response: "&bChatGPT: %s"
question: "&bYou: %s"
invalid_model: "&cInvalid model. Use /chatgpt modellist to see available models."
available_models: "&eAvailable models:"
no_permission: "&cYou do not have permission to use this command. Required permission: %s"

View File

@@ -2,29 +2,40 @@
api:
# 你的 OpenAI API key用于身份验证
# 获取 API key 的方法:访问 //platform.openai.com/account/api-keys 并创建一个新的 API key
key: "your_openai_api_key"
key: "sk-your_openai_api_key"
# OpenAI API 的基础 URL用于构建请求
base_url: "https://api.openai.com/v1"
# 支持的模型列表
models:
# OpenAI ChatGPT
- "gpt-3.5-turbo"
- "gpt-3.5-turbo-instruct"
- "gpt-4"
- "gpt-4-turbo"
- "gpt-4-turbo-preview"
- "gpt-4o"
# Google Gemini
# - "gemini-pro"
# - "gemini-1.5-pro"
# Anthropic Claude
# - "claude-3-opus"
# - "claude-3-5-sonnet"
# 以及更多...
# 默认使用的模型
default_model: "gpt-3.5-turbo"
# 消息相关设置
messages:
reload: "已重新加载配置文件!"
help: "===== MineChatGPT 帮助 ====="
help_ask: "/chatgpt <text> - 向ChatGPT提问"
help_reload: "/chatgpt reload - 重新加载配置文件"
help_model: "/chatgpt model <model_name> - 切换至其他模型"
help_modellist: "/chatgpt modellist - 可用的模型列表"
usage: "输入: /chatgpt model <model_name>"
model_switch: "已切换至模型 %s"
chatgpt_error: "无法联系ChatGPT。"
chatgpt_response: "ChatGPT: %s"
question: "你: %s"
invalid_model: "模型无效。使用 /chatgpt modellist 查看可用模型。"
available_models: "可用模型列表:"
no_permission: "你没有权限使用这个指令。需要的权限:%s"
reload: "&a已重新加载配置文件!"
help: "&e===== MineChatGPT 帮助 ====="
help_ask: "&e/chatgpt <text> - 向ChatGPT提问"
help_reload: "&e/chatgpt reload - 重新加载配置文件"
help_model: "&e/chatgpt model <model_name> - 切换至其他模型"
help_modellist: "&e/chatgpt modellist - 可用的模型列表"
usage: "&c输入: /chatgpt model <model_name>"
model_switch: "&a已切换至模型 %s"
chatgpt_error: "&c无法联系ChatGPT。"
chatgpt_response: "&bChatGPT: %s"
question: "&b你: %s"
invalid_model: "&c模型无效。使用 /chatgpt modellist 查看可用模型。"
available_models: "&e可用模型列表:"
no_permission: "&c你没有权限使用这个指令。需要的权限:%s"

View File

@@ -7,7 +7,7 @@ description: A Spigot plugin for interacting with ChatGPT
commands:
chatgpt:
description: Interact with ChatGPT
usage: /chatgpt <question>
usage: /chatgpt <text>
permissions:
minechatgpt.use:
description: Allows using the /chatgpt command to interact with AI