You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/services/localLLMService.ts
+47-5Lines changed: 47 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ import { getGroqSettings, type GroqSettings } from '../components/DemoCall/GroqS
36
36
// API calls routed via secure proxy
37
37
import{proxyJSON,ProxyRoutes}from'./proxyClient';
38
38
import{ragService}from'./ragService';
39
+
import{pageIndexService}from'./pageIndexService';
39
40
40
41
importlogfrom'../utils/logger';
41
42
@@ -90,7 +91,7 @@ const RAG_TOOLS = [
90
91
function: {
91
92
name: 'get_document_details',
92
93
description:
93
-
'Get detailed information from a specific uploaded document by searching for a keyword or topic within it. Use when you need precise details from a known document.',
94
+
'Get detailed information from a specific uploaded document by searching for a keyword or topic within it. Prefer PageIndex structured nodes (with page references) when available.',
94
95
parameters: {
95
96
type: 'object',
96
97
properties: {
@@ -626,7 +627,7 @@ class GroqLLMService {
626
627
627
628
// Build messages array for Groq API (OpenAI format)
{role: 'system'asconst,content: systemPrompt+(hasKnowledgeBase ? '\n\nYou have access to a knowledge base. Use the search_knowledge_base tool when the caller asks about business-specific information. ALWAYS search before answering questions about products, services, policies, pricing, or procedures.' : '')},
630
+
{role: 'system'asconst,content: systemPrompt+(hasKnowledgeBase ? '\n\nYou have access to a knowledge base. Use the search_knowledge_base tool when the caller asks about business-specific information. ALWAYS search before answering questions about products, services, policies, pricing, or procedures. Use get_document_details when the caller references a specific document or asks for precise details; it can return PageIndex results with page references when available.' : '')},
0 commit comments