@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.
19 lines (14 loc) • 554 B
text/typescript
// TypeScript prompt wrapper that uses actual chain implementation
import { chainSummaryTitle } from '@lobechat/prompts';
import type { OpenAIChatMessage } from '@lobechat/types';
interface PromptVars {
locale: string;
messages: OpenAIChatMessage[];
}
export default function generatePrompt({ vars }: { vars: PromptVars }) {
const { messages, locale } = vars;
// Use the actual chain function from src
const result = chainSummaryTitle(messages, locale);
// Return messages array as expected by promptfoo
return result.messages || [];
}