Skip to content

Commit

Permalink
[Obs AI Assistant] OpenAI Connector default model assignment bug (ela…
Browse files Browse the repository at this point in the history
  • Loading branch information
Rassyan authored Apr 11, 2024
1 parent c80be51 commit 7c6f4fe
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ export const getRequestWithStreamOption = (
stream: boolean,
defaultModel: string
): string => {
if (!APIS_ALLOWING_STREAMING.has(url)) {
return body;
}

try {
const jsonBody = JSON.parse(body);
if (jsonBody) {
jsonBody.stream = stream;
if (APIS_ALLOWING_STREAMING.has(url)) {
jsonBody.stream = stream;
}
jsonBody.model = jsonBody.model || defaultModel;
}

Expand Down

0 comments on commit 7c6f4fe

Please sign in to comment.