Skip to content

Commit 4d5f84b

Browse files
committed
Nit
1 parent 780db90 commit 4d5f84b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/subscribers/openai/chat.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ class OpenAIChatCompletions extends AiMonitoringChatSubscriber {
244244
// If it's `chat.completions.create`, we check against `response.choices`.
245245
let isResponse
246246
if (response?.object === 'response') {
247-
isResponse = message.content === response?.output?.[0]?.content?.[0]?.text
247+
isResponse = message.content === response.output?.[0]?.content?.[0]?.text
248248
} else if (response?.object?.includes('chat.completion')) {
249-
isResponse = message.content === response?.choices?.[0]?.message?.content
249+
isResponse = message.content === response.choices?.[0]?.message?.content
250250
}
251251

252252
return new LlmChatCompletionMessage({

0 commit comments

Comments
 (0)