mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-31 03:03:22 +08:00
完善 models
This commit is contained in:
parent
44eaf62e6c
commit
dac256f4f9
@ -18,10 +18,6 @@ const ChatChatProvider = memo(() => {
|
||||
const { t } = useTranslation('setting');
|
||||
const theme = useTheme();
|
||||
|
||||
console.log('----ttt---1-', t('llm.ChatChat.endpoint.title'))
|
||||
console.log('----ttt---2-', t('llm.Ollama.endpoint.title'))
|
||||
console.log('----ttt---3-', t)
|
||||
|
||||
return (
|
||||
<ProviderConfig
|
||||
configItems={[
|
||||
|
||||
@ -12,6 +12,8 @@ import {
|
||||
OpenAI,
|
||||
Perplexity,
|
||||
Tongyi,
|
||||
Spark,
|
||||
Wenxin,
|
||||
} from '@lobehub/icons';
|
||||
import { memo } from 'react';
|
||||
|
||||
@ -38,6 +40,8 @@ const ModelIcon = memo<ModelProviderIconProps>(({ model, size = 12 }) => {
|
||||
return <Baichuan.Avatar background={Baichuan.colorPrimary} size={size} />;
|
||||
if (model.includes('mistral') || model.includes('mixtral')) return <Mistral.Avatar size={size} />;
|
||||
if (model.includes('pplx')) return <Perplexity.Avatar size={size} />;
|
||||
if (model.includes('Spark')) return <Spark.Avatar size={size} />;
|
||||
if (model.includes('ERNIE')) return <Wenxin.Avatar size={size} />;
|
||||
});
|
||||
|
||||
export default ModelIcon;
|
||||
|
||||
@ -4,15 +4,78 @@ const ChatChat: ModelProviderCard = {
|
||||
id: 'chatchat',
|
||||
chatModels: [
|
||||
{
|
||||
id: 'chatglm_pro',
|
||||
tokens: 128_000,
|
||||
displayName: 'chatglm_pro'
|
||||
id: 'chatglm3-6b',
|
||||
tokens: 4000,
|
||||
displayName: 'chatglm3-6b',
|
||||
functionCall: true,
|
||||
},
|
||||
{
|
||||
id: 'gpt-4-turbo-2024-04-09',
|
||||
tokens: 128_000,
|
||||
displayName: 'gpt-4-turbo-2024-04-09',
|
||||
vision: true,
|
||||
id: 'chatglm_turbo',
|
||||
tokens: 4000,
|
||||
displayName: 'chatglm_turbo',
|
||||
},
|
||||
{
|
||||
id: 'chatglm_std',
|
||||
tokens: 4000,
|
||||
displayName: 'chatglm_std',
|
||||
},
|
||||
{
|
||||
id: 'chatglm_lite',
|
||||
tokens: 4000,
|
||||
displayName: 'chatglm_lite',
|
||||
},
|
||||
{
|
||||
id: 'qwen-turbo',
|
||||
tokens: 4000,
|
||||
displayName: 'qwen-turbo',
|
||||
functionCall: true,
|
||||
},
|
||||
{
|
||||
id: 'qwen-plus',
|
||||
tokens: 4000,
|
||||
displayName: 'qwen-plus',
|
||||
},
|
||||
{
|
||||
id: 'qwen-max',
|
||||
tokens: 4000,
|
||||
displayName: 'qwen-max',
|
||||
},
|
||||
{
|
||||
id: 'qwen:7b',
|
||||
tokens: 4000,
|
||||
displayName: 'qwen:7b',
|
||||
functionCall: true,
|
||||
},
|
||||
{
|
||||
id: 'qwen:14b',
|
||||
tokens: 4000,
|
||||
displayName: 'qwen:14b',
|
||||
functionCall: true,
|
||||
},
|
||||
{
|
||||
id: 'qwen-max-longcontext',
|
||||
tokens: 4000,
|
||||
displayName: 'qwen-max-longcontext',
|
||||
},
|
||||
{
|
||||
id: 'ERNIE-Bot',
|
||||
tokens: 4000,
|
||||
displayName: 'ERNIE-Bot',
|
||||
},
|
||||
{
|
||||
id: 'ERNIE-Bot-turbo',
|
||||
tokens: 4000,
|
||||
displayName: 'ERNIE-Bot-turbo',
|
||||
},
|
||||
{
|
||||
id: 'ERNIE-Bot-4',
|
||||
tokens: 4000,
|
||||
displayName: 'ERNIE-Bot-4',
|
||||
},
|
||||
{
|
||||
id: 'SparkDesk',
|
||||
tokens: 4000,
|
||||
displayName: 'SparkDesk',
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -35,9 +35,6 @@ const Tools = memo(() => {
|
||||
const list = useToolStore(pluginSelectors.installedPluginMetaList, isEqual);
|
||||
const builtinList = useToolStore(builtinToolSelectors.metaList, isEqual);
|
||||
|
||||
console.log('builtinList--', builtinList)
|
||||
console.log('list--', list)
|
||||
|
||||
const enablePluginCount = useSessionStore(
|
||||
(s) =>
|
||||
agentSelectors
|
||||
|
||||
@ -27,7 +27,6 @@ export class LobeChatChatAI implements LobeRuntimeAI {
|
||||
|
||||
async chat(payload: ChatStreamPayload, options?: ChatCompetitionOptions) {
|
||||
|
||||
console.log('payload---', payload)
|
||||
try {
|
||||
const response = await this.client.chat.completions.create(
|
||||
payload as unknown as (OpenAI.ChatCompletionCreateParamsStreaming | OpenAI.ChatCompletionCreateParamsNonStreaming),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user