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