feat: Vorschläge für Folgesuchen hinzufügen
- CSS-Stile für vorgeschlagene Suchschaltflächen hinzugefügt - HTML-Container für die Anzeige vorgeschlagener Suchen hinzugefügt - Logik zur Darstellung und Interaktion mit vorgeschlagenen Suchen implementiert - OpenRouter-Prompt um Hinweis auf Folgesuchen erweitert - JSON-Schema um Feld 'suggestedSearches' ergänzt
This commit is contained in:
@@ -162,7 +162,7 @@ export async function summarizeFinalAnswer({ openrouter, text, question }) {
|
||||
You are a search result analyst. Today is the date of ${new Date().toLocaleDateString()}.
|
||||
Based on the following search results for the query "${question}",
|
||||
Summarize the search results to answer the original query. Use Emoji and HTML. Tags allowed: <b>, <i>, <u>, <pre>, <ul>, <li>, <span style="color:...">, <p> <div> <hr/>
|
||||
Also provide the most relevant sources. Answer in the language of the question.
|
||||
Also provide the most relevant sources. Answer in the language of the question. You may suggest followup searched to the user.
|
||||
`;
|
||||
|
||||
const params = {
|
||||
@@ -179,13 +179,11 @@ export async function summarizeFinalAnswer({ openrouter, text, question }) {
|
||||
strict: true,
|
||||
schema: {
|
||||
type: 'object',
|
||||
required: ['fullAnswerHTMLSnippet', 'mostRelevantSources'],
|
||||
required: ['fullAnswerHTMLSnippet', 'mostRelevantSources', 'suggestedSearches'],
|
||||
properties: {
|
||||
fullAnswerHTMLSnippet: { type: 'string' },
|
||||
mostRelevantSources: {
|
||||
type: 'array',
|
||||
items: { type: 'string' },
|
||||
},
|
||||
mostRelevantSources: { type: 'array', items: { type: 'string' } },
|
||||
suggestedSearches: { type: 'array', items: { type: 'string' } },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user