mirror of
https://github.com/zadam/trilium.git
synced 2026-05-23 14:31:38 +02:00
feat(llm): improve prompt when no access to web
This commit is contained in:
@@ -104,6 +104,13 @@ export abstract class BaseProvider implements LlmProvider {
|
||||
: noToolsHint;
|
||||
}
|
||||
|
||||
if (!config.enableWebSearch) {
|
||||
const noWebSearchHint = `You do not have access to web search. If the user asks for current/real-time information, news, or anything that requires searching the web, inform them that "Web search" is disabled and they need to enable it in the chat settings (click on the model name dropdown and toggle "Web search").`;
|
||||
systemPrompt = systemPrompt
|
||||
? `${systemPrompt}\n\n${noWebSearchHint}`
|
||||
: noWebSearchHint;
|
||||
}
|
||||
|
||||
return systemPrompt;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user