Skip to content

Commit 1ad2704

Browse files
committed
SDK regeneration
1 parent 9851d90 commit 1ad2704

File tree

4 files changed

+47
-9
lines changed

4 files changed

+47
-9
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "humanloop"
33

44
[tool.poetry]
55
name = "humanloop"
6-
version = "0.8.37"
6+
version = "0.8.38"
77
description = ""
88
readme = "README.md"
99
authors = []

src/humanloop/agents/raw_client.py

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import contextlib
44
import datetime as dt
5+
import json
56
import typing
67
from json.decoder import JSONDecodeError
78

@@ -591,7 +592,13 @@ def _iter():
591592
if _sse.data == None:
592593
return
593594
try:
594-
yield _sse.data
595+
yield typing.cast(
596+
AgentCallStreamResponse,
597+
construct_type(
598+
type_=AgentCallStreamResponse, # type: ignore
599+
object_=json.loads(_sse.data),
600+
),
601+
)
595602
except Exception:
596603
pass
597604
return
@@ -889,7 +896,13 @@ def _iter():
889896
if _sse.data == None:
890897
return
891898
try:
892-
yield _sse.data
899+
yield typing.cast(
900+
AgentContinueCallStreamResponse,
901+
construct_type(
902+
type_=AgentContinueCallStreamResponse, # type: ignore
903+
object_=json.loads(_sse.data),
904+
),
905+
)
893906
except Exception:
894907
pass
895908
return
@@ -2558,7 +2571,13 @@ async def _iter():
25582571
if _sse.data == None:
25592572
return
25602573
try:
2561-
yield _sse.data
2574+
yield typing.cast(
2575+
AgentCallStreamResponse,
2576+
construct_type(
2577+
type_=AgentCallStreamResponse, # type: ignore
2578+
object_=json.loads(_sse.data),
2579+
),
2580+
)
25622581
except Exception:
25632582
pass
25642583
return
@@ -2856,7 +2875,13 @@ async def _iter():
28562875
if _sse.data == None:
28572876
return
28582877
try:
2859-
yield _sse.data
2878+
yield typing.cast(
2879+
AgentContinueCallStreamResponse,
2880+
construct_type(
2881+
type_=AgentContinueCallStreamResponse, # type: ignore
2882+
object_=json.loads(_sse.data),
2883+
),
2884+
)
28602885
except Exception:
28612886
pass
28622887
return

src/humanloop/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[floa
1414

1515
def get_headers(self) -> typing.Dict[str, str]:
1616
headers: typing.Dict[str, str] = {
17-
"User-Agent": "humanloop/0.8.37",
17+
"User-Agent": "humanloop/0.8.38",
1818
"X-Fern-Language": "Python",
1919
"X-Fern-SDK-Name": "humanloop",
20-
"X-Fern-SDK-Version": "0.8.37",
20+
"X-Fern-SDK-Version": "0.8.38",
2121
}
2222
headers["X-API-KEY"] = self.api_key
2323
return headers

src/humanloop/prompts/raw_client.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import contextlib
44
import datetime as dt
5+
import json
56
import typing
67
from json.decoder import JSONDecodeError
78

@@ -686,7 +687,13 @@ def _iter():
686687
if _sse.data == None:
687688
return
688689
try:
689-
yield _sse.data
690+
yield typing.cast(
691+
PromptCallStreamResponse,
692+
construct_type(
693+
type_=PromptCallStreamResponse, # type: ignore
694+
object_=json.loads(_sse.data),
695+
),
696+
)
690697
except Exception:
691698
pass
692699
return
@@ -2637,7 +2644,13 @@ async def _iter():
26372644
if _sse.data == None:
26382645
return
26392646
try:
2640-
yield _sse.data
2647+
yield typing.cast(
2648+
PromptCallStreamResponse,
2649+
construct_type(
2650+
type_=PromptCallStreamResponse, # type: ignore
2651+
object_=json.loads(_sse.data),
2652+
),
2653+
)
26412654
except Exception:
26422655
pass
26432656
return

0 commit comments

Comments
 (0)