Skip to content

Commit 58add64

Browse files
chore(api): openapi updates for conversations
1 parent 3a3cabb commit 58add64

File tree

4 files changed

+34
-27
lines changed

4 files changed

+34
-27
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-65d42621b731238ad4e59a35a705fc0608b17f53a14d047e66ce480c793da26b.yml
3-
openapi_spec_hash: d7ca86b2507600cbd5ed197cf31263c2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-937fcfac8cbab692796cd9822b37e48a311e2220a8b103106ded0ee92a0b9484.yml
3+
openapi_spec_hash: 74a0c58b5b8c4e06792d79b685e02a01
44
config_hash: 666d6bb4b564f0d9d431124b5d1a0665

src/openai/resources/conversations/conversations.py

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

33
from __future__ import annotations
44

5-
from typing import Dict, Iterable, Optional
5+
from typing import Iterable, Optional
66

77
import httpx
88

@@ -115,7 +115,7 @@ def retrieve(
115115
timeout: float | httpx.Timeout | None | NotGiven = not_given,
116116
) -> Conversation:
117117
"""
118-
Get a conversation with the given ID.
118+
Get a conversation
119119
120120
Args:
121121
extra_headers: Send extra headers
@@ -140,7 +140,7 @@ def update(
140140
self,
141141
conversation_id: str,
142142
*,
143-
metadata: Dict[str, str],
143+
metadata: Optional[Metadata],
144144
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
145145
# The extra values given here take precedence over values defined on the client or passed to this method.
146146
extra_headers: Headers | None = None,
@@ -149,14 +149,15 @@ def update(
149149
timeout: float | httpx.Timeout | None | NotGiven = not_given,
150150
) -> Conversation:
151151
"""
152-
Update a conversation's metadata with the given ID.
152+
Update a conversation
153153
154154
Args:
155155
metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
156156
for storing additional information about the object in a structured format, and
157-
querying for objects via API or the dashboard. Keys are strings with a maximum
158-
length of 64 characters. Values are strings with a maximum length of 512
159-
characters.
157+
querying for objects via API or the dashboard.
158+
159+
Keys are strings with a maximum length of 64 characters. Values are strings with
160+
a maximum length of 512 characters.
160161
161162
extra_headers: Send extra headers
162163
@@ -188,8 +189,9 @@ def delete(
188189
extra_body: Body | None = None,
189190
timeout: float | httpx.Timeout | None | NotGiven = not_given,
190191
) -> ConversationDeletedResource:
191-
"""
192-
Delete a conversation with the given ID.
192+
"""Delete a conversation.
193+
194+
Items in the conversation will not be deleted.
193195
194196
Args:
195197
extra_headers: Send extra headers
@@ -296,7 +298,7 @@ async def retrieve(
296298
timeout: float | httpx.Timeout | None | NotGiven = not_given,
297299
) -> Conversation:
298300
"""
299-
Get a conversation with the given ID.
301+
Get a conversation
300302
301303
Args:
302304
extra_headers: Send extra headers
@@ -321,7 +323,7 @@ async def update(
321323
self,
322324
conversation_id: str,
323325
*,
324-
metadata: Dict[str, str],
326+
metadata: Optional[Metadata],
325327
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
326328
# The extra values given here take precedence over values defined on the client or passed to this method.
327329
extra_headers: Headers | None = None,
@@ -330,14 +332,15 @@ async def update(
330332
timeout: float | httpx.Timeout | None | NotGiven = not_given,
331333
) -> Conversation:
332334
"""
333-
Update a conversation's metadata with the given ID.
335+
Update a conversation
334336
335337
Args:
336338
metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
337339
for storing additional information about the object in a structured format, and
338-
querying for objects via API or the dashboard. Keys are strings with a maximum
339-
length of 64 characters. Values are strings with a maximum length of 512
340-
characters.
340+
querying for objects via API or the dashboard.
341+
342+
Keys are strings with a maximum length of 64 characters. Values are strings with
343+
a maximum length of 512 characters.
341344
342345
extra_headers: Send extra headers
343346
@@ -371,8 +374,9 @@ async def delete(
371374
extra_body: Body | None = None,
372375
timeout: float | httpx.Timeout | None | NotGiven = not_given,
373376
) -> ConversationDeletedResource:
374-
"""
375-
Delete a conversation with the given ID.
377+
"""Delete a conversation.
378+
379+
Items in the conversation will not be deleted.
376380
377381
Args:
378382
extra_headers: Send extra headers

src/openai/types/conversations/conversation_create_params.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
class ConversationCreateParams(TypedDict, total=False):
1515
items: Optional[Iterable[ResponseInputItemParam]]
16-
"""
17-
Initial items to include in the conversation context. You may add up to 20 items
18-
at a time.
16+
"""Initial items to include in the conversation context.
17+
18+
You may add up to 20 items at a time.
1919
"""
2020

2121
metadata: Optional[Metadata]

src/openai/types/conversations/conversation_update_params.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict
5+
from typing import Optional
66
from typing_extensions import Required, TypedDict
77

8+
from ..shared_params.metadata import Metadata
9+
810
__all__ = ["ConversationUpdateParams"]
911

1012

1113
class ConversationUpdateParams(TypedDict, total=False):
12-
metadata: Required[Dict[str, str]]
14+
metadata: Required[Optional[Metadata]]
1315
"""Set of 16 key-value pairs that can be attached to an object.
1416
1517
This can be useful for storing additional information about the object in a
16-
structured format, and querying for objects via API or the dashboard. Keys are
17-
strings with a maximum length of 64 characters. Values are strings with a
18-
maximum length of 512 characters.
18+
structured format, and querying for objects via API or the dashboard.
19+
20+
Keys are strings with a maximum length of 64 characters. Values are strings with
21+
a maximum length of 512 characters.
1922
"""

0 commit comments

Comments
 (0)