mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 07:08:55 +02:00
refactor(llm): remove deprecated validateEmbeddingProviders method and update session handling in chat services
This commit is contained in:
parent
3a55735cd5
commit
d8d5318ace
@ -154,14 +154,6 @@ export class AIServiceManager implements IAIServiceManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use validateConfiguration() instead
|
||||
*/
|
||||
async validateEmbeddingProviders(): Promise<string | null> {
|
||||
log.info('validateEmbeddingProviders is deprecated, use validateConfiguration instead');
|
||||
return this.validateConfiguration();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure manager is initialized before using
|
||||
*/
|
||||
@ -626,7 +618,7 @@ export default {
|
||||
},
|
||||
// Add validateEmbeddingProviders method
|
||||
async validateEmbeddingProviders(): Promise<string | null> {
|
||||
return getInstance().validateEmbeddingProviders();
|
||||
return getInstance().validateConfiguration();
|
||||
},
|
||||
// Context and index related methods
|
||||
getContextExtractor() {
|
||||
|
@ -139,13 +139,8 @@ class RestChatService {
|
||||
if (!session && req.method === 'POST') {
|
||||
log.info(`No Chat Note found for ${chatNoteId}, creating a new Chat Note and session`);
|
||||
|
||||
// Create a new Chat Note via the storage service
|
||||
//const chatStorageService = (await import('../../llm/chat_storage_service.js')).default;
|
||||
//const newChat = await chatStorageService.createChat('New Chat');
|
||||
|
||||
// Use the new Chat Note's ID for the session
|
||||
session = SessionsStore.createSession({
|
||||
//title: newChat.title,
|
||||
chatNoteId: chatNoteId
|
||||
});
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
import log from "../../log.js";
|
||||
import { LLM_CONSTANTS } from '../constants/provider_constants.js';
|
||||
import { SEARCH_CONSTANTS } from '../constants/search_constants.js';
|
||||
import { randomString } from "../../utils.js";
|
||||
import type { ChatSession, ChatMessage } from '../interfaces/chat_session.js';
|
||||
|
||||
// In-memory storage for sessions
|
||||
|
Loading…
x
Reference in New Issue
Block a user