You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChatBaiduWenxin hosts multiple models, such as Llama. I wanted to call it through new ChatBaiduWenxin, but internally verified a list of models
const models = {
"ERNIE-Bot": "completions",
"ERNIE-Bot-turbo": "eb-instant",
"ERNIE-Bot-4": "completions_pro",
"ERNIE-Speed-8K": "ernie_speed",
"ERNIE-Speed-128K": "ernie-speed-128k",
"ERNIE-4.0-8K": "completions_pro",
"ERNIE-4.0-8K-Preview": "ernie-4.0-8k-preview",
"ERNIE-3.5-8K": "completions",
"ERNIE-3.5-8K-Preview": "ernie-3.5-8k-preview",
"ERNIE-Lite-8K": "eb-instant",
"ERNIE-Tiny-8K": "ernie-tiny-8k",
"ERNIE-Character-8K": "ernie-char-8k",
"ERNIE Speed-AppBuilder": "ai_apaas",
};
if (this.model in models) {
this.apiUrl = https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ ${models[this.model]};
}
else {
throw new Error(Invalid model name: ${this.model});
}
May I kindly ask how to remove this restriction of the model list?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Checked other resources
Commit to Help
Example Code
Description
ChatBaiduWenxin hosts multiple models, such as Llama. I wanted to call it through new ChatBaiduWenxin, but internally verified a list of models
const models = {
"ERNIE-Bot": "completions",
"ERNIE-Bot-turbo": "eb-instant",
"ERNIE-Bot-4": "completions_pro",
"ERNIE-Speed-8K": "ernie_speed",
"ERNIE-Speed-128K": "ernie-speed-128k",
"ERNIE-4.0-8K": "completions_pro",
"ERNIE-4.0-8K-Preview": "ernie-4.0-8k-preview",
"ERNIE-3.5-8K": "completions",
"ERNIE-3.5-8K-Preview": "ernie-3.5-8k-preview",
"ERNIE-Lite-8K": "eb-instant",
"ERNIE-Tiny-8K": "ernie-tiny-8k",
"ERNIE-Character-8K": "ernie-char-8k",
"ERNIE Speed-AppBuilder": "ai_apaas",
};
if (this.model in models) {
this.apiUrl =
https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/ ${models[this.model]}
;}
else {
throw new Error(
Invalid model name: ${this.model}
);}
May I kindly ask how to remove this restriction of the model list?
System Info
"@langchain/community": "^0.2.13",
Beta Was this translation helpful? Give feedback.
All reactions