Skip to content

Commit

Permalink
fix model name
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmacarthy committed Jan 1, 2024
1 parent 4e61a3e commit 8237607
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/providers/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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('<EOT>')) {
console.log(completion)
if (json.response && json.response === '\n' || json.response.match('<EOT>')) {
onComplete()
resolveStream(null)
this._statusBar.text = '🤖'
Expand Down

0 comments on commit 8237607

Please sign in to comment.