@lobehub/chat
Version:
Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.
20 lines (18 loc) • 556 B
text/typescript
import { DEFAULT_MODEL } from '@/const/settings';
import { ChatStreamPayload } from '@/types/openai/chat';
export const chainAbstractChunkText = (text: string): Partial<ChatStreamPayload> => {
return {
messages: [
{
content:
'你是一名擅长从 chunk 中提取摘要的助理,你需要将用户的会话总结为 1~2 句话的摘要,输出成 chunk 所使用的语种',
role: 'system',
},
{
content: `chunk: ${text}`,
role: 'user',
},
],
model: DEFAULT_MODEL,
};
};