-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
AI model config guide
ElecTerm supports integration with various AI models through an OpenAI-compatible API. This guide will help you understand and set up the AI configuration. Please create a issue if you have other AI API need to be suppoorted.

This is the base URL for the AI provider's API. Different providers have different URLs:
- OpenAI:
https://api.openai.com/v1 - DeepSeek:
https://api.deepseek.com/v1
This is the path of the AI provider's API, default is /chat/completions
For other providers, please refer to their documentation for the correct API URL.
The AI model you want to use. Common options include:
- For OpenAI:
gpt-4,gpt-3.5-turbo,gpt-3.5-turbo-16k - For DeepSeek:
deepseek-chat,deepseek-coder
Each provider offers different models. Make sure to choose a model that's compatible with your selected API URL.
Your personal API key provided by the AI service. This is used to authenticate your requests. Keep this key secure and never share it publicly.
This is a prompt that sets the context or role for the AI. It helps guide the AI's behavior and responses. For example:
- "You are a helpful assistant for a terminal application."
- "You are an expert in Linux commands and shell scripting."
- Open the AI settings in ElecTerm.
- Enter the API URL for your chosen provider.
- Select or enter the model you want to use.
- Input your API key.
- Define the system role to set the AI's context.
- Save your settings.
- The OpenAI library is used as the backend, which is compatible with many AI providers.
- Always check your provider's documentation for the most up-to-date information on API URLs and available models.
- Be mindful of your API usage as it may incur costs depending on your provider and plan.
For more information on specific providers:
ElecTerm 支持通过兼容 OpenAI 的 API 集成各种 AI 模型。本指南将帮助您理解和设置 AI 配置。
这是 AI 提供商 API 的基础 URL。不同的提供商有不同的 URL:
- OpenAI:
https://api.openai.com/v1 - DeepSeek:
https://api.deepseek.com/v1
对于其他提供商,请参考他们的文档以获取正确的 API URL。
API链接的路径部分, 默认是 /chat/completions
您想要使用的 AI 模型。常见选项包括:
- OpenAI:
gpt-4,gpt-3.5-turbo,gpt-3.5-turbo-16k - DeepSeek:
deepseek-chat,deepseek-coder
每个提供商提供不同的模型。确保选择与您选定的 API URL 兼容的模型。
AI 服务提供的个人 API 密钥。用于验证您的请求。请保管好这个密钥,切勿公开分享。
这是为 AI 设置上下文或角色的提示。它有助于指导 AI 的行为和响应。例如:
- "你是一个终端应用程序的有用助手。"
- "你是 Linux 命令和 shell 脚本的专家。"
- 在 ElecTerm 中打开 AI 设置。
- 输入您选择的提供商的 API URL。
- 选择或输入您想使用的模型。
- 输入您的 API 密钥。
- 定义系统角色以设置 AI 的上下文。
- 保存您的设置。
- OpenAI 库被用作后端,它与许多 AI 提供商兼容。
- 始终查看您的提供商的文档,以获取有关 API URL 和可用模型的最新信息。
- 请注意您的 API 使用情况,因为根据您的提供商和计划,可能会产生费用。
有关特定提供商的更多信息: