From 0e9a8a27e5652e8cefe3e38937d60a920ce34a37 Mon Sep 17 00:00:00 2001 From: Akarshan Biswas Date: Tue, 20 May 2025 12:48:08 +0530 Subject: [PATCH] fixup from refactoring --- extensions/llamacpp-extension/src/index.ts | 20 +------------------- extensions/llamacpp-extension/src/types.ts | 2 +- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/extensions/llamacpp-extension/src/index.ts b/extensions/llamacpp-extension/src/index.ts index 68a2143c6..188945763 100644 --- a/extensions/llamacpp-extension/src/index.ts +++ b/extensions/llamacpp-extension/src/index.ts @@ -235,25 +235,7 @@ export default class llamacpp_extension async chat( opts: chatOptions ): Promise> { - const sessionInfo = this.activeSessions.get(opts.sessionId) - if (!sessionInfo) { - throw new Error( - `No active session found for sessionId: ${opts.sessionId}` - ) - } - - // For streaming responses - if (opts.stream) { - return this.streamChat(opts) - } - - // For non-streaming responses - try { - return await invoke('plugin:llamacpp|chat', { opts }) - } catch (error) { - console.error('Error during chat completion:', error) - throw new Error(`Chat completion failed: ${error}`) - } + throw new Error("method not implemented yet") } async delete(opts: deleteOptions): Promise { diff --git a/extensions/llamacpp-extension/src/types.ts b/extensions/llamacpp-extension/src/types.ts index 3a8837147..dda61f2fd 100644 --- a/extensions/llamacpp-extension/src/types.ts +++ b/extensions/llamacpp-extension/src/types.ts @@ -89,7 +89,7 @@ export interface modelInfo { export interface listOptions { providerId: string; // To specify which provider if a central manager calls this } -export type listResult = ModelInfo[]; +export type listResult = modelInfo[]; // 2. /pull export interface pullOptions {