From 82376079eb35e8c574e9f5212d7b29e544db1b2a Mon Sep 17 00:00:00 2001 From: rjmacarthy Date: Mon, 1 Jan 2024 21:11:28 +0000 Subject: [PATCH] fix model name --- src/providers/completion.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/providers/completion.ts b/src/providers/completion.ts index fc45bdc6..02f97b3d 100644 --- a/src/providers/completion.ts +++ b/src/providers/completion.ts @@ -20,7 +20,7 @@ export class CompletionProvider implements InlineCompletionItemProvider { private _config = workspace.getConfiguration('twinny') private _debounceWait = this._config.get('debounceWait') as number private _contextLength = this._config.get('contextLength') as number - private _model = this._config.get('fimOllamaModelName') as string + private _model = this._config.get('fimModelName') as string private _baseurl = this._config.get('ollamaBaseUrl') as string private _apiport = this._config.get('ollamaApiPort') as number @@ -82,7 +82,8 @@ export class CompletionProvider implements InlineCompletionItemProvider { try { const json = JSON.parse(chunk) completion = completion + json.response - if (json.response === '\n' || json.response.match('')) { + console.log(completion) + if (json.response && json.response === '\n' || json.response.match('')) { onComplete() resolveStream(null) this._statusBar.text = '🤖'