Commit 58add648

stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
2025-09-23 07:20:40
chore(api): openapi updates for conversations
1 parent 3a3cabb
Changed files (4)
src/openai/resources/conversations/conversations.py
@@ -2,7 +2,7 @@
 
 from __future__ import annotations
 
-from typing import Dict, Iterable, Optional
+from typing import Iterable, Optional
 
 import httpx
 
@@ -115,7 +115,7 @@ class Conversations(SyncAPIResource):
         timeout: float | httpx.Timeout | None | NotGiven = not_given,
     ) -> Conversation:
         """
-        Get a conversation with the given ID.
+        Get a conversation
 
         Args:
           extra_headers: Send extra headers
@@ -140,7 +140,7 @@ class Conversations(SyncAPIResource):
         self,
         conversation_id: str,
         *,
-        metadata: Dict[str, str],
+        metadata: Optional[Metadata],
         # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
         # The extra values given here take precedence over values defined on the client or passed to this method.
         extra_headers: Headers | None = None,
@@ -149,14 +149,15 @@ class Conversations(SyncAPIResource):
         timeout: float | httpx.Timeout | None | NotGiven = not_given,
     ) -> Conversation:
         """
-        Update a conversation's metadata with the given ID.
+        Update a conversation
 
         Args:
           metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
               for storing additional information about the object in a structured format, and
-              querying for objects via API or the dashboard. Keys are strings with a maximum
-              length of 64 characters. Values are strings with a maximum length of 512
-              characters.
+              querying for objects via API or the dashboard.
+
+              Keys are strings with a maximum length of 64 characters. Values are strings with
+              a maximum length of 512 characters.
 
           extra_headers: Send extra headers
 
@@ -188,8 +189,9 @@ class Conversations(SyncAPIResource):
         extra_body: Body | None = None,
         timeout: float | httpx.Timeout | None | NotGiven = not_given,
     ) -> ConversationDeletedResource:
-        """
-        Delete a conversation with the given ID.
+        """Delete a conversation.
+
+        Items in the conversation will not be deleted.
 
         Args:
           extra_headers: Send extra headers
@@ -296,7 +298,7 @@ class AsyncConversations(AsyncAPIResource):
         timeout: float | httpx.Timeout | None | NotGiven = not_given,
     ) -> Conversation:
         """
-        Get a conversation with the given ID.
+        Get a conversation
 
         Args:
           extra_headers: Send extra headers
@@ -321,7 +323,7 @@ class AsyncConversations(AsyncAPIResource):
         self,
         conversation_id: str,
         *,
-        metadata: Dict[str, str],
+        metadata: Optional[Metadata],
         # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
         # The extra values given here take precedence over values defined on the client or passed to this method.
         extra_headers: Headers | None = None,
@@ -330,14 +332,15 @@ class AsyncConversations(AsyncAPIResource):
         timeout: float | httpx.Timeout | None | NotGiven = not_given,
     ) -> Conversation:
         """
-        Update a conversation's metadata with the given ID.
+        Update a conversation
 
         Args:
           metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
               for storing additional information about the object in a structured format, and
-              querying for objects via API or the dashboard. Keys are strings with a maximum
-              length of 64 characters. Values are strings with a maximum length of 512
-              characters.
+              querying for objects via API or the dashboard.
+
+              Keys are strings with a maximum length of 64 characters. Values are strings with
+              a maximum length of 512 characters.
 
           extra_headers: Send extra headers
 
@@ -371,8 +374,9 @@ class AsyncConversations(AsyncAPIResource):
         extra_body: Body | None = None,
         timeout: float | httpx.Timeout | None | NotGiven = not_given,
     ) -> ConversationDeletedResource:
-        """
-        Delete a conversation with the given ID.
+        """Delete a conversation.
+
+        Items in the conversation will not be deleted.
 
         Args:
           extra_headers: Send extra headers
src/openai/types/conversations/conversation_create_params.py
@@ -13,9 +13,9 @@ __all__ = ["ConversationCreateParams"]
 
 class ConversationCreateParams(TypedDict, total=False):
     items: Optional[Iterable[ResponseInputItemParam]]
-    """
-    Initial items to include in the conversation context. You may add up to 20 items
-    at a time.
+    """Initial items to include in the conversation context.
+
+    You may add up to 20 items at a time.
     """
 
     metadata: Optional[Metadata]
src/openai/types/conversations/conversation_update_params.py
@@ -2,18 +2,21 @@
 
 from __future__ import annotations
 
-from typing import Dict
+from typing import Optional
 from typing_extensions import Required, TypedDict
 
+from ..shared_params.metadata import Metadata
+
 __all__ = ["ConversationUpdateParams"]
 
 
 class ConversationUpdateParams(TypedDict, total=False):
-    metadata: Required[Dict[str, str]]
+    metadata: Required[Optional[Metadata]]
     """Set of 16 key-value pairs that can be attached to an object.
 
     This can be useful for storing additional information about the object in a
-    structured format, and querying for objects via API or the dashboard. Keys are
-    strings with a maximum length of 64 characters. Values are strings with a
-    maximum length of 512 characters.
+    structured format, and querying for objects via API or the dashboard.
+
+    Keys are strings with a maximum length of 64 characters. Values are strings with
+    a maximum length of 512 characters.
     """
.stats.yml
@@ -1,4 +1,4 @@
 configured_endpoints: 118
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-65d42621b731238ad4e59a35a705fc0608b17f53a14d047e66ce480c793da26b.yml
-openapi_spec_hash: d7ca86b2507600cbd5ed197cf31263c2
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-937fcfac8cbab692796cd9822b37e48a311e2220a8b103106ded0ee92a0b9484.yml
+openapi_spec_hash: 74a0c58b5b8c4e06792d79b685e02a01
 config_hash: 666d6bb4b564f0d9d431124b5d1a0665