mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Obs AI Assistant] OpenAI Connector default model assignment bug (#178369)
This commit is contained in:
parent
c80be519b2
commit
7c6f4fe7d7
1 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue