mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
chore(monorepo/server): fix build errors due to wrong imports
This commit is contained in:
parent
e655963004
commit
6e35806340
@ -2,6 +2,7 @@
|
|||||||
* Message formatting utilities for different LLM providers
|
* Message formatting utilities for different LLM providers
|
||||||
*/
|
*/
|
||||||
import type { Message } from "../../ai_interface.js";
|
import type { Message } from "../../ai_interface.js";
|
||||||
|
import { CONTEXT_PROMPTS } from "../../constants/llm_prompt_constants.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for message formatters
|
* Interface for message formatters
|
||||||
@ -111,9 +112,6 @@ export function buildContextFromNotes(sources: any[], query: string): string {
|
|||||||
return query || '';
|
return query || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Import the CONTEXT_PROMPTS constant
|
|
||||||
const { CONTEXT_PROMPTS } = require('../../constants/llm_prompt_constants.js');
|
|
||||||
|
|
||||||
// Use the template from the constants file, replacing placeholders
|
// Use the template from the constants file, replacing placeholders
|
||||||
return CONTEXT_PROMPTS.CONTEXT_NOTES_WRAPPER
|
return CONTEXT_PROMPTS.CONTEXT_NOTES_WRAPPER
|
||||||
.replace('{noteContexts}', noteContexts)
|
.replace('{noteContexts}', noteContexts)
|
||||||
|
@ -422,7 +422,7 @@ export class ToolCallingStage extends BasePipelineStage<ToolExecutionInput, { re
|
|||||||
* @returns The requested dependency or null if it couldn't be created
|
* @returns The requested dependency or null if it couldn't be created
|
||||||
*/
|
*/
|
||||||
private async getOrCreateDependency(dependencyType: string, toolName: string): Promise<any> {
|
private async getOrCreateDependency(dependencyType: string, toolName: string): Promise<any> {
|
||||||
const aiServiceManager = require('../../../ai_service_manager.js').default;
|
const aiServiceManager = (await import('../../ai_service_manager.js')).default;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
log.info(`Getting dependency '${dependencyType}' for tool '${toolName}'`);
|
log.info(`Getting dependency '${dependencyType}' for tool '${toolName}'`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user