letta-client 0.1.157__py3-none-any.whl → 0.1.158__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of letta-client might be problematic. Click here for more details.
- letta_client/__init__.py +0 -2
- letta_client/core/client_wrapper.py +1 -1
- letta_client/voice/__init__.py +0 -3
- letta_client/voice/client.py +10 -38
- {letta_client-0.1.157.dist-info → letta_client-0.1.158.dist-info}/METADATA +1 -1
- {letta_client-0.1.157.dist-info → letta_client-0.1.158.dist-info}/RECORD +7 -9
- letta_client/voice/types/__init__.py +0 -5
- letta_client/voice/types/create_voice_chat_completions_request_body.py +0 -9
- {letta_client-0.1.157.dist-info → letta_client-0.1.158.dist-info}/WHEEL +0 -0
letta_client/__init__.py
CHANGED
|
@@ -308,7 +308,6 @@ from .tools import (
|
|
|
308
308
|
ListMcpServersResponseValue,
|
|
309
309
|
)
|
|
310
310
|
from .version import __version__
|
|
311
|
-
from .voice import CreateVoiceChatCompletionsRequestBody
|
|
312
311
|
|
|
313
312
|
__all__ = [
|
|
314
313
|
"ActionModel",
|
|
@@ -414,7 +413,6 @@ __all__ = [
|
|
|
414
413
|
"CreateAgentRequestResponseFormat",
|
|
415
414
|
"CreateAgentRequestToolRulesItem",
|
|
416
415
|
"CreateBlock",
|
|
417
|
-
"CreateVoiceChatCompletionsRequestBody",
|
|
418
416
|
"DeleteMcpServerResponseItem",
|
|
419
417
|
"DynamicManager",
|
|
420
418
|
"DynamicManagerUpdate",
|
|
@@ -16,7 +16,7 @@ class BaseClientWrapper:
|
|
|
16
16
|
headers: typing.Dict[str, str] = {
|
|
17
17
|
"X-Fern-Language": "Python",
|
|
18
18
|
"X-Fern-SDK-Name": "letta-client",
|
|
19
|
-
"X-Fern-SDK-Version": "0.1.
|
|
19
|
+
"X-Fern-SDK-Version": "0.1.158",
|
|
20
20
|
}
|
|
21
21
|
if self.token is not None:
|
|
22
22
|
headers["Authorization"] = f"Bearer {self.token}"
|
letta_client/voice/__init__.py
CHANGED
letta_client/voice/client.py
CHANGED
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
4
|
from ..core.client_wrapper import SyncClientWrapper
|
|
5
|
-
from .types.create_voice_chat_completions_request_body import CreateVoiceChatCompletionsRequestBody
|
|
6
5
|
from ..core.request_options import RequestOptions
|
|
7
6
|
from ..core.jsonable_encoder import jsonable_encoder
|
|
8
|
-
from ..core.serialization import convert_and_respect_annotation_metadata
|
|
9
7
|
from ..core.unchecked_base_model import construct_type
|
|
10
8
|
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
11
9
|
from ..types.http_validation_error import HttpValidationError
|
|
@@ -25,7 +23,7 @@ class VoiceClient:
|
|
|
25
23
|
self,
|
|
26
24
|
agent_id: str,
|
|
27
25
|
*,
|
|
28
|
-
request:
|
|
26
|
+
request: typing.Dict[str, typing.Optional[typing.Any]],
|
|
29
27
|
user_id: typing.Optional[str] = None,
|
|
30
28
|
request_options: typing.Optional[RequestOptions] = None,
|
|
31
29
|
) -> typing.Optional[typing.Any]:
|
|
@@ -34,7 +32,7 @@ class VoiceClient:
|
|
|
34
32
|
----------
|
|
35
33
|
agent_id : str
|
|
36
34
|
|
|
37
|
-
request :
|
|
35
|
+
request : typing.Dict[str, typing.Optional[typing.Any]]
|
|
38
36
|
|
|
39
37
|
user_id : typing.Optional[str]
|
|
40
38
|
|
|
@@ -48,33 +46,20 @@ class VoiceClient:
|
|
|
48
46
|
|
|
49
47
|
Examples
|
|
50
48
|
--------
|
|
51
|
-
from letta_client import
|
|
52
|
-
ChatCompletionDeveloperMessageParam,
|
|
53
|
-
CompletionCreateParamsNonStreaming,
|
|
54
|
-
Letta,
|
|
55
|
-
)
|
|
49
|
+
from letta_client import Letta
|
|
56
50
|
|
|
57
51
|
client = Letta(
|
|
58
52
|
token="YOUR_TOKEN",
|
|
59
53
|
)
|
|
60
54
|
client.voice.create_voice_chat_completions(
|
|
61
55
|
agent_id="agent_id",
|
|
62
|
-
request=
|
|
63
|
-
messages=[
|
|
64
|
-
ChatCompletionDeveloperMessageParam(
|
|
65
|
-
content="content",
|
|
66
|
-
)
|
|
67
|
-
],
|
|
68
|
-
model="model",
|
|
69
|
-
),
|
|
56
|
+
request={"key": "value"},
|
|
70
57
|
)
|
|
71
58
|
"""
|
|
72
59
|
_response = self._client_wrapper.httpx_client.request(
|
|
73
60
|
f"v1/voice-beta/{jsonable_encoder(agent_id)}/chat/completions",
|
|
74
61
|
method="POST",
|
|
75
|
-
json=
|
|
76
|
-
object_=request, annotation=CreateVoiceChatCompletionsRequestBody, direction="write"
|
|
77
|
-
),
|
|
62
|
+
json=request,
|
|
78
63
|
headers={
|
|
79
64
|
"user-id": str(user_id) if user_id is not None else None,
|
|
80
65
|
},
|
|
@@ -114,7 +99,7 @@ class AsyncVoiceClient:
|
|
|
114
99
|
self,
|
|
115
100
|
agent_id: str,
|
|
116
101
|
*,
|
|
117
|
-
request:
|
|
102
|
+
request: typing.Dict[str, typing.Optional[typing.Any]],
|
|
118
103
|
user_id: typing.Optional[str] = None,
|
|
119
104
|
request_options: typing.Optional[RequestOptions] = None,
|
|
120
105
|
) -> typing.Optional[typing.Any]:
|
|
@@ -123,7 +108,7 @@ class AsyncVoiceClient:
|
|
|
123
108
|
----------
|
|
124
109
|
agent_id : str
|
|
125
110
|
|
|
126
|
-
request :
|
|
111
|
+
request : typing.Dict[str, typing.Optional[typing.Any]]
|
|
127
112
|
|
|
128
113
|
user_id : typing.Optional[str]
|
|
129
114
|
|
|
@@ -139,11 +124,7 @@ class AsyncVoiceClient:
|
|
|
139
124
|
--------
|
|
140
125
|
import asyncio
|
|
141
126
|
|
|
142
|
-
from letta_client import
|
|
143
|
-
AsyncLetta,
|
|
144
|
-
ChatCompletionDeveloperMessageParam,
|
|
145
|
-
CompletionCreateParamsNonStreaming,
|
|
146
|
-
)
|
|
127
|
+
from letta_client import AsyncLetta
|
|
147
128
|
|
|
148
129
|
client = AsyncLetta(
|
|
149
130
|
token="YOUR_TOKEN",
|
|
@@ -153,14 +134,7 @@ class AsyncVoiceClient:
|
|
|
153
134
|
async def main() -> None:
|
|
154
135
|
await client.voice.create_voice_chat_completions(
|
|
155
136
|
agent_id="agent_id",
|
|
156
|
-
request=
|
|
157
|
-
messages=[
|
|
158
|
-
ChatCompletionDeveloperMessageParam(
|
|
159
|
-
content="content",
|
|
160
|
-
)
|
|
161
|
-
],
|
|
162
|
-
model="model",
|
|
163
|
-
),
|
|
137
|
+
request={"key": "value"},
|
|
164
138
|
)
|
|
165
139
|
|
|
166
140
|
|
|
@@ -169,9 +143,7 @@ class AsyncVoiceClient:
|
|
|
169
143
|
_response = await self._client_wrapper.httpx_client.request(
|
|
170
144
|
f"v1/voice-beta/{jsonable_encoder(agent_id)}/chat/completions",
|
|
171
145
|
method="POST",
|
|
172
|
-
json=
|
|
173
|
-
object_=request, annotation=CreateVoiceChatCompletionsRequestBody, direction="write"
|
|
174
|
-
),
|
|
146
|
+
json=request,
|
|
175
147
|
headers={
|
|
176
148
|
"user-id": str(user_id) if user_id is not None else None,
|
|
177
149
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
letta_client/__init__.py,sha256=
|
|
1
|
+
letta_client/__init__.py,sha256=2X95vFIKPYYoAtp_d437qy_T9kGhn3tSjgvglH3upKE,17194
|
|
2
2
|
letta_client/agents/__init__.py,sha256=3oFWVxaaxkphkjGJVk31Llb9ll9dKoCGx3B_r3qqtes,1716
|
|
3
3
|
letta_client/agents/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
4
4
|
letta_client/agents/blocks/client.py,sha256=ecE03lE5tP1AtCMFLT9FzdYyQMx_D7NI5m42b41pV40,24684
|
|
@@ -62,7 +62,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_create_re
|
|
|
62
62
|
letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item_access_item.py,sha256=R-H25IpNp9feSrW8Yj3h9O3UTMVvFniQJElogKxLuoE,254
|
|
63
63
|
letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
|
|
64
64
|
letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
|
65
|
-
letta_client/core/client_wrapper.py,sha256=
|
|
65
|
+
letta_client/core/client_wrapper.py,sha256=nKg5nPtYoLHksAm6lUSNv3-Pw5OsuE2E5Gbkr-eEoBo,1998
|
|
66
66
|
letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
67
67
|
letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
68
68
|
letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
|
|
@@ -394,10 +394,8 @@ letta_client/types/web_search_options_search_context_size.py,sha256=RgJGV4rkuaCT
|
|
|
394
394
|
letta_client/types/web_search_options_user_location.py,sha256=4aXfFcwUBu7YNA5XBjfhmD6tgRb0e8LTFexmn-rkDfw,770
|
|
395
395
|
letta_client/types/web_search_options_user_location_approximate.py,sha256=Ywk01J9H67L6_498E5E6ceJ2VbJUfcLiIJWD_s92_M0,731
|
|
396
396
|
letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
|
|
397
|
-
letta_client/voice/__init__.py,sha256=
|
|
398
|
-
letta_client/voice/client.py,sha256=
|
|
399
|
-
letta_client/
|
|
400
|
-
letta_client/
|
|
401
|
-
letta_client-0.1.
|
|
402
|
-
letta_client-0.1.157.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
403
|
-
letta_client-0.1.157.dist-info/RECORD,,
|
|
397
|
+
letta_client/voice/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
398
|
+
letta_client/voice/client.py,sha256=EX79F2D5bieXNP8g1ZPw8xwAzqE1A3hshCHUSlTV1kw,5739
|
|
399
|
+
letta_client-0.1.158.dist-info/METADATA,sha256=TADPzFpKPXVxzN0-didPXQNa94hW9b36Tzq96tj5y2Y,5093
|
|
400
|
+
letta_client-0.1.158.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
401
|
+
letta_client-0.1.158.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
import typing
|
|
4
|
-
from ...types.completion_create_params_non_streaming import CompletionCreateParamsNonStreaming
|
|
5
|
-
from ...types.completion_create_params_streaming import CompletionCreateParamsStreaming
|
|
6
|
-
|
|
7
|
-
CreateVoiceChatCompletionsRequestBody = typing.Union[
|
|
8
|
-
CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming
|
|
9
|
-
]
|
|
File without changes
|