Add DeepSeek model to Chat (#170)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
64f5e51e67
commit
28876eee56
56 files changed
+3307
-1479
No files matched your search
@@ -2,7 +2,16 @@ import { applicationOperator, chatOperator, serviceOperator } from '@/operators'
|
||||
import { IRootState } from '../common/models';
|
||||
import { ActionContext } from 'vuex';
|
||||
import { IChatState } from './models';
|
||||
import { IApplication, IApplicationType, IChatConversation, IChatModel, ICredential, IService, Status } from '@/models';
|
||||
import {
|
||||
IApplication,
|
||||
IApplicationType,
|
||||
IChatConversation,
|
||||
IChatModel,
|
||||
IChatModelGroup,
|
||||
ICredential,
|
||||
IService,
|
||||
Status
|
||||
} from '@/models';
|
||||
import { CHAT_SERVICE_ID } from '@/constants';
|
||||
|
||||
export const resetAll = ({ commit }: ActionContext<IChatState, IRootState>): void => {
|
||||
@@ -13,6 +22,10 @@ export const setModel = async ({ commit }: any, payload: IChatModel): Promise<vo
|
||||
commit('setModel', payload);
|
||||
};
|
||||
|
||||
export const setModelGroup = async ({ commit }: any, payload: IChatModelGroup): Promise<void> => {
|
||||
commit('setModelGroup', payload);
|
||||
};
|
||||
|
||||
export const setApplication = async ({ commit }: any, payload: IApplication): Promise<void> => {
|
||||
console.debug('set application', payload);
|
||||
commit('setApplication', payload);
|
||||
@@ -153,6 +166,7 @@ export const getConversations = async ({
|
||||
export default {
|
||||
resetAll,
|
||||
setModel,
|
||||
setModelGroup,
|
||||
getService,
|
||||
setService,
|
||||
setCredential,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { IApplication, IChatConversation, IChatModel, ICredential, IService, Status } from '@/models';
|
||||
import { IApplication, IChatConversation, IChatModel, IChatModelGroup, ICredential, IService, Status } from '@/models';
|
||||
|
||||
export interface IChatState {
|
||||
model: IChatModel;
|
||||
modelGroup: IChatModelGroup;
|
||||
applications: IApplication[] | undefined;
|
||||
application: IApplication | undefined;
|
||||
service: IService | undefined;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IApplication, IChatConversation, IChatModel, ICredential, IService } from '@/models';
|
||||
import { IApplication, IChatConversation, IChatModel, IChatModelGroup, ICredential, IService } from '@/models';
|
||||
import { IChatState } from './models';
|
||||
|
||||
export const resetAll = (state: IChatState): void => {
|
||||
@@ -12,6 +12,10 @@ export const setModel = (state: IChatState, payload: IChatModel): void => {
|
||||
state.model = payload;
|
||||
};
|
||||
|
||||
export const setModelGroup = (state: IChatState, payload: IChatModelGroup): void => {
|
||||
state.modelGroup = payload;
|
||||
};
|
||||
|
||||
export const setCredential = (state: IChatState, payload: ICredential): void => {
|
||||
state.credential = payload;
|
||||
};
|
||||
@@ -34,6 +38,7 @@ export const setConversations = (state: IChatState, payload: IChatConversation[]
|
||||
|
||||
export default {
|
||||
setModel,
|
||||
setModelGroup,
|
||||
setService,
|
||||
setCredential,
|
||||
setConversations,
|
||||
|
||||
@@ -1 +1,8 @@
|
||||
export default ['chat.application', 'chat.service', 'chat.credential', 'chat.conversations', 'chat.model'];
|
||||
export default [
|
||||
'chat.application',
|
||||
'chat.service',
|
||||
'chat.credential',
|
||||
'chat.conversations',
|
||||
'chat.model',
|
||||
'chat.modelGroup'
|
||||
];
|
||||
@@ -1,10 +1,11 @@
|
||||
import { CHAT_MODEL_GPT_4 } from '@/constants';
|
||||
import { CHAT_MODEL_GPT_4O, CHAT_MODEL_GROUP_CHATGPT } from '@/constants';
|
||||
import { IChatState } from './models';
|
||||
import { Status } from '@/models';
|
||||
|
||||
export default (): IChatState => {
|
||||
return {
|
||||
model: CHAT_MODEL_GPT_4,
|
||||
model: CHAT_MODEL_GPT_4O,
|
||||
modelGroup: CHAT_MODEL_GROUP_CHATGPT,
|
||||
applications: undefined,
|
||||
application: undefined,
|
||||
conversations: undefined,
|
||||
|
||||
Reference in new issue
Block a user