Update language-inference-engine.js
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run

This commit is contained in:
Namhyeon Go 2025-02-15 16:09:39 +09:00
parent e659c8daf2
commit b31add8d74

View File

@ -13,6 +13,7 @@
// - Google Gemini: https://developers.google.com/idx/support/privacy
// - DeepSeek: https://chat.deepseek.com/downloads/DeepSeek%20Privacy%20Policy.html
// - Moonshot: https://kimi.moonshot.cn/user/agreement/userPrivacy
// - AlibabaCloud: https://www.alibabacloud.com/help/en/legal/latest/alibaba-cloud-international-website-privacy-policy
// - ClovaStudio: https://clova-x.naver.com/ai_policies
// - Catswords AI: https://policy.catswords.social/site_terms.html
//
@ -379,6 +380,47 @@ var ENGINE_PROFILES = {
}
}
},
"alibabacloud": {
"type": "llm",
"availableModels": [
"qwen-plus",
"qwen-max",
"qwen-turbo"
],
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer {apikey}"
},
"url": "https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions",
"wrap": function(model, message, temperature) {
return {
"model": model,
"messages": [
{
"role": "system",
"content": BIAS_MESSAGE
},
{
"role": "user",
"content": message
}
],
"temperature": temperature,
"stream": false
};
},
"callback": function(response) {
if ("error" in response) {
return ["Error: " + response.error.message];
} else {
return response.choices.reduce(function(a, x) {
a.push(x.message.content);
return a;
}, []);
}
}
},
"catswords-ai": {
"type": "llm",
"availableModels": [
@ -491,7 +533,7 @@ exports.create = function() {
return new LanguageInferenceEngine();
};
exports.VERSIONINFO = "Language Inference Engine integration version 0.1.10";
exports.VERSIONINFO = "Language Inference Engine integration version 0.1.11";
exports.AUTHOR = "abuse@catswords.net";
exports.global = global;
exports.require = global.require;