LunaTranslator/docs/en/guochandamoxing.md
test123456654321 8731bbb2cb docs
2024-10-26 21:12:43 +08:00

6.4 KiB

How to Use Large Model API for Translation

How to use multiple ChatGPT-compatible interfaces (or dedicated interfaces) simultaneously? If you simply have multiple different keys and want to poll them, just separate them with a `|`.
However, sometimes you want to use multiple different API addresses/prompts/models/parameters at the same time to compare translation effects. The method is:
Click the "+" button at the bottom right A window will pop up, select ChatGPT-compatible interface (or dedicated interface), and give it a name. This will copy the current ChatGPT-compatible interface (or dedicated interface) settings and API. Activate the copied interface and you can make individual settings. The copied interface can run with the original interface, allowing you to use multiple different settings.

model can be selected from the drop-down list, and if it's not in the list, you can manually enter/modify it according to the official documentation of the interface.
Some interfaces can dynamically obtain the model list based on API Interface Address and API Key. After filling in these two items, click the refresh button next to model to get the list of available models.

ChatGPT-Compatible Interfaces

Most large model platforms use ChatGPT-compatible interfaces.
Since there are so many platforms, it's impossible to list them all. For other interfaces not listed, please refer to their documentation to fill in the corresponding parameters.

Foreign Large Model Interfaces

OpenAI

API Interface Address https://api.openai.com/v1

API Key https://platform.openai.com/api-keys

model https://platform.openai.com/docs/models

groq

API Interface Address https://api.groq.com/openai/v1/chat/completions

API Key https://console.groq.com/keys

model https://console.groq.com/docs/models Fill in Model ID

OpenRouter

API Interface Address https://openrouter.ai/api/v1/chat/completions

API Key https://openrouter.ai/settings/keys

model https://openrouter.ai/docs/models

Mistral AI

API Interface Address https://api.mistral.ai/v1/chat/completions

API Key https://console.mistral.ai/api-keys/

model https://docs.mistral.ai/getting-started/models/

Azure

API Endpoint URL https://{endpoint}.openai.azure.com/openai/deployments/{deployName}/chat/completions?api-version=2023-12-01-preview

Replace {endpoint} and {deployName} with your endpoint and deployName.

Domestic Large Model Interfaces

DeepSeek

API Interface Address https://api.deepseek.com

API Key https://platform.deepseek.com/api_keys

model https://platform.deepseek.com/api-docs/zh-cn/pricing

Alibaba Cloud Bailian Large Model

API Interface Address https://dashscope.aliyuncs.com/compatible-mode/v1

API Key https://bailian.console.aliyun.com/?apiKey=1#/api-key

model https://help.aliyun.com/zh/model-studio/getting-started/models

ByteDance DouBao Large Model

API Interface Address https://ark.cn-beijing.volces.com/api/v3

API Key Create API Key to obtain

model Create Inference Access Point, fill in Access Point instead of Model

img

Moonshot AI

API Interface Address https://api.moonshot.cn

API Key https://platform.moonshot.cn/console/api-keys

model https://platform.moonshot.cn/docs/intro

Zhipu AI

API Interface Address https://open.bigmodel.cn/api/paas/v4/chat/completions

API Key https://bigmodel.cn/usercenter/apikeys

model https://bigmodel.cn/dev/howuse/model

Lingyiwanwu

API Interface Address https://api.lingyiwanwu.com

API Key https://platform.lingyiwanwu.com/apikeys

model https://platform.lingyiwanwu.com/docs/api-reference#list-models

SiliconFlow

API Interface Address https://api.siliconflow.cn

API Key https://cloud-hk.siliconflow.cn/account/ak

model https://docs.siliconflow.cn/docs/model-names

iFlytek Spark Large Model

API Interface Address https://spark-api-open.xf-yun.com/v1

API Key Refer to the official documentation to obtain APIKey and APISecret, fill in according to the format of APIKey:APISecret

model https://www.xfyun.cn/doc/spark/HTTP%E8%B0%83%E7%94%A8%E6%96%87%E6%A1%A3.html#_3-2-%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0

Dedicated Interfaces for Specific Platforms

Some large model platforms are not fully compatible with the ChatGPT interface, please fill in the parameters to use in the dedicated interface.

Foreign Large Model Interfaces

gemini

model https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models

API Key https://aistudio.google.com/app/apikey

claude

BASE_URL https://api.anthropic.com

API_KEY https://console.anthropic.com/

model https://docs.anthropic.com/en/docs/about-claude/models

cohere

API Key https://dashboard.cohere.com/api-keys

model https://docs.cohere.com/docs/models

Domestic Large Model Interfaces

Tencent Hunyuan Large Model

SecretId & SecretKey https://console.cloud.tencent.com/cam/capi

model https://cloud.tencent.com/document/product/1729/97731

Baidu Qianfan Large Model

!> This model seems to only support Chinese-English translation and does not support Japanese.

model Should fill in the tail of the Request Address in the Baidu interface documentation, for example:

img

img