This commit is contained in:
2025-12-08 01:56:17 +08:00
parent 04a21d7178
commit 7793764baa
54 changed files with 762 additions and 1091 deletions

View File

@@ -0,0 +1,42 @@
import { QueryUtil } from '../../../query/index.ts';
type Message = {
role?: 'user' | 'assistant' | 'system' | 'tool';
content?: string;
name?: string;
};
export type PostChat = {
messages?: Message[];
model?: string;
group?: string;
user?: string;
};
export type ChatDataOpts = {
id?: string;
title?: string;
messages?: any[];
data?: any;
type?: 'temp' | 'keep' | string;
};
export type ChatOpts = {
username: string;
model: string;
/**
* 获取完整消息回复
*/
getFull?: boolean;
group: string;
/**
* openai的参数
*/
options?: any;
};
export const appDefine = QueryUtil.create({
chat: {
path: 'ai',
key: 'chat',
description: '与 AI 进行对话, 调用 GPT 的AI 服务,生成结果,并返回。',
},
});