File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import contextlib
44import datetime as dt
5- import json
65import typing
76from json .decoder import JSONDecodeError
87
@@ -687,13 +686,7 @@ def _iter():
687686 if _sse .data == None :
688687 return
689688 try :
690- yield typing .cast (
691- PromptCallStreamResponse ,
692- construct_type (
693- type_ = PromptCallStreamResponse , # type: ignore
694- object_ = json .loads (_sse .data ),
695- ),
696- )
689+ yield _sse .data
697690 except Exception :
698691 pass
699692 return
Original file line number Diff line number Diff line change 1+ import json
2+
13from humanloop .client import Humanloop
24
35from tests .integration .conftest import TestIdentifiers
@@ -37,6 +39,7 @@ def test_prompts_call_stream(
3739 output = ""
3840 for chunk in response :
3941 assert chunk is not None
42+ chunk = json .loads (chunk )
4043 assert chunk .output is not None
4144 assert chunk .id is not None
4245 assert chunk .prompt_id is not None
You can’t perform that action at this time.
0 commit comments