@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.
18 lines (16 loc) • 436 B
text/typescript
import { ChatStreamPayload } from '@/types/openai/chat';
export const chainTranslate = (
content: string,
targetLang: string,
): Partial<ChatStreamPayload> => ({
messages: [
{
content: '你是一名擅长翻译的助理,你需要将输入的语言翻译为目标语言',
role: 'system',
},
{
content: `请将以下内容 ${content},翻译为 ${targetLang} `,
role: 'user',
},
],
});