feat: статья из Discover, локализация, подсказки
- Статья: заголовок + ссылка (truncate), title в URL, articleTitle в Message - Локализация Sources, Research Progress, Answer, шагов, formingAnswer - Подсказки: промпт без жёсткого примера, разнообразие, label 'Что ещё спросить' - embeddedTranslations, countryToLocale, locale инструкция для LLM Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import formatChatHistoryAsString from '@/lib/utils/formatHistory';
|
||||
import { suggestionGeneratorPrompt } from '@/lib/prompts/suggestions';
|
||||
import { getSuggestionGeneratorPrompt } from '@/lib/prompts/suggestions';
|
||||
import { ChatTurnMessage } from '@/lib/types';
|
||||
import z from 'zod';
|
||||
import BaseLLM from '@/lib/models/base/llm';
|
||||
|
||||
type SuggestionGeneratorInput = {
|
||||
chatHistory: ChatTurnMessage[];
|
||||
locale?: string;
|
||||
};
|
||||
|
||||
const schema = z.object({
|
||||
@@ -22,7 +23,7 @@ const generateSuggestions = async (
|
||||
messages: [
|
||||
{
|
||||
role: 'system',
|
||||
content: suggestionGeneratorPrompt,
|
||||
content: getSuggestionGeneratorPrompt(input.locale),
|
||||
},
|
||||
{
|
||||
role: 'user',
|
||||
|
||||
Reference in New Issue
Block a user