Skip to content

Commit c4dd552

Browse files
Update langfuse/openai.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent a369476 commit c4dd552

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

langfuse/openai.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,10 @@ def _extract_streamed_response_api_response(chunks):
524524

525525
if key == "output":
526526
output = val
527-
528-
if len(output) > 1:
527+
if not isinstance(output, list):
528+
completion = output
529+
elif len(output) > 1:
529530
completion = output
530-
531531
elif len(output) == 1:
532532
completion = output[0]
533533

0 commit comments

Comments
 (0)