feat(agent): Refactor search agents and implement SpeedSearchAgent
- Updated FileSearchAgent to improve code readability and formatting. - Refactored SynthesizerAgent for better prompt handling and document processing. - Enhanced TaskManagerAgent with clearer file context handling. - Modified AgentSearch to maintain consistent parameter formatting. - Introduced SpeedSearchAgent for optimized search functionality. - Updated metaSearchAgent to support new SpeedSearchAgent. - Improved file processing utilities for better document handling. - Added test attachments for sporting events queries.
This commit is contained in:
parent
de3d26fb15
commit
d66300e78e
19 changed files with 832 additions and 996 deletions
|
|
@ -127,12 +127,13 @@ export class TaskManagerAgent {
|
|||
});
|
||||
|
||||
const template = PromptTemplate.fromTemplate(taskBreakdownPrompt);
|
||||
|
||||
|
||||
// Create file context information
|
||||
const fileContext = state.fileIds && state.fileIds.length > 0
|
||||
? `Files attached: ${state.fileIds.length} file(s) are available for analysis. Consider creating tasks that can leverage these attached files when appropriate.`
|
||||
: 'No files attached: Focus on tasks that can be answered through web research or general knowledge.';
|
||||
|
||||
const fileContext =
|
||||
state.fileIds && state.fileIds.length > 0
|
||||
? `Files attached: ${state.fileIds.length} file(s) are available for analysis. Consider creating tasks that can leverage these attached files when appropriate.`
|
||||
: 'No files attached: Focus on tasks that can be answered through web research or general knowledge.';
|
||||
|
||||
const prompt = await template.format({
|
||||
systemInstructions: this.systemInstructions,
|
||||
fileContext: fileContext,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue