refactor(llm): remove deprecated validateEmbeddingProviders method and update session handling in chat services

This commit is contained in:
perf3ct 2025-06-02 21:55:52 +00:00
parent 3a55735cd5
commit d8d5318ace
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232
3 changed files with 1 additions and 15 deletions

View File

@ -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 * Ensure manager is initialized before using
*/ */
@ -626,7 +618,7 @@ export default {
}, },
// Add validateEmbeddingProviders method // Add validateEmbeddingProviders method
async validateEmbeddingProviders(): Promise<string | null> { async validateEmbeddingProviders(): Promise<string | null> {
return getInstance().validateEmbeddingProviders(); return getInstance().validateConfiguration();
}, },
// Context and index related methods // Context and index related methods
getContextExtractor() { getContextExtractor() {

View File

@ -139,13 +139,8 @@ class RestChatService {
if (!session && req.method === 'POST') { if (!session && req.method === 'POST') {
log.info(`No Chat Note found for ${chatNoteId}, creating a new Chat Note and session`); 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 // Use the new Chat Note's ID for the session
session = SessionsStore.createSession({ session = SessionsStore.createSession({
//title: newChat.title,
chatNoteId: chatNoteId chatNoteId: chatNoteId
}); });

View File

@ -4,7 +4,6 @@
import log from "../../log.js"; import log from "../../log.js";
import { LLM_CONSTANTS } from '../constants/provider_constants.js'; import { LLM_CONSTANTS } from '../constants/provider_constants.js';
import { SEARCH_CONSTANTS } from '../constants/search_constants.js'; import { SEARCH_CONSTANTS } from '../constants/search_constants.js';
import { randomString } from "../../utils.js";
import type { ChatSession, ChatMessage } from '../interfaces/chat_session.js'; import type { ChatSession, ChatMessage } from '../interfaces/chat_session.js';
// In-memory storage for sessions // In-memory storage for sessions