Skip to content

Commit

Permalink
fix ooba chat completions #202
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmacarthy committed Apr 8, 2024
1 parent d5254e5 commit 0967777
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/extension/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,11 @@ export const getChatDataFromProvider = (
return data?.choices[0].delta?.content
? data?.choices[0].delta.content
: ''
case ApiProviders.Oobabooga:
return data?.choices[0].text
case ApiProviders.LlamaCpp:
return data?.content
case ApiProviders.LiteLLM:
default:
if (data?.choices[0].delta.content === 'undefined') {
return ''
}
if (data?.choices[0].delta.content === 'undefined') return ''
return data?.choices[0].delta?.content
? data?.choices[0].delta.content
: ''
Expand Down

0 comments on commit 0967777

Please sign in to comment.