mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-12 00:45:14 +00:00
Update language-inference-engine.js
This commit is contained in:
parent
e659c8daf2
commit
b31add8d74
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user