mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	clean up hardcoded values part 4
This commit is contained in:
		| @@ -15,6 +15,7 @@ import { CONTEXT_PROMPTS } from '../../constants/llm_prompt_constants.js'; | ||||
| import { QUERY_DECOMPOSITION_STRINGS } from '../../constants/query_decomposition_constants.js'; | ||||
| import JsonExtractor from '../../utils/json_extractor.js'; | ||||
| import type { LLMServiceInterface } from '../../interfaces/agent_tool_interfaces.js'; | ||||
| import { SEARCH_CONSTANTS } from '../../constants/search_constants.js'; | ||||
|  | ||||
| // Interfaces | ||||
| export interface SubQuery { | ||||
| @@ -72,8 +73,8 @@ Format your answer as a valid JSON array without markdown code blocks, like this | ||||
|       ]; | ||||
|  | ||||
|       const options = { | ||||
|         temperature: 0.3, | ||||
|         maxTokens: 300, | ||||
|         temperature: SEARCH_CONSTANTS.TEMPERATURE.QUERY_PROCESSOR, | ||||
|         maxTokens: SEARCH_CONSTANTS.LIMITS.QUERY_PROCESSOR_MAX_TOKENS, | ||||
|         bypassFormatter: true, | ||||
|         expectsJsonResponse: true, | ||||
|         _bypassContextProcessing: true // Prevent recursive calls | ||||
|   | ||||
| @@ -15,6 +15,8 @@ import becca from '../../../becca/becca.js'; | ||||
| import log from '../../log.js'; | ||||
| import type BNote from '../../../becca/entities/bnote.js'; | ||||
| import type BAttribute from '../../../becca/entities/battribute.js'; | ||||
| import sql from "../../sql.js"; | ||||
| import { SEARCH_CONSTANTS } from "../constants/search_constants.js"; | ||||
|  | ||||
| export interface NoteInfo { | ||||
|   noteId: string; | ||||
| @@ -51,9 +53,9 @@ interface NoteStructure { | ||||
| } | ||||
|  | ||||
| export class NoteNavigatorTool { | ||||
|   private maxPathLength: number = 20; | ||||
|   private maxBreadth: number = 100; | ||||
|   private maxDepth: number = 5; | ||||
|   private maxPathLength: number = SEARCH_CONSTANTS.HIERARCHY.MAX_PATH_LENGTH; | ||||
|   private maxBreadth: number = SEARCH_CONSTANTS.HIERARCHY.MAX_BREADTH; | ||||
|   private maxDepth: number = SEARCH_CONSTANTS.HIERARCHY.MAX_DEPTH; | ||||
|  | ||||
|   /** | ||||
|    * Get detailed information about a note | ||||
|   | ||||
| @@ -9,6 +9,7 @@ import log from '../../log.js'; | ||||
| import becca from '../../../becca/becca.js'; | ||||
| import attributes from '../../attributes.js'; | ||||
| import aiServiceManager from '../ai_service_manager.js'; | ||||
| import { SEARCH_CONSTANTS } from '../constants/search_constants.js'; | ||||
|  | ||||
| /** | ||||
|  * Definition of the relationship tool | ||||
| @@ -347,8 +348,8 @@ Suggest the most appropriate relationship type that would connect the source not | ||||
|                         }, | ||||
|                         { role: 'user', content: prompt } | ||||
|                     ], { | ||||
|                         temperature: 0.4, | ||||
|                         maxTokens: 50 | ||||
|                         temperature: SEARCH_CONSTANTS.TEMPERATURE.RELATIONSHIP_TOOL, | ||||
|                         maxTokens: SEARCH_CONSTANTS.LIMITS.RELATIONSHIP_TOOL_MAX_TOKENS | ||||
|                     }); | ||||
|  | ||||
|                     // Extract just the relation name (remove any formatting or explanation) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user