From 8effd08be3ab1cf509bdbfd9f174f9186fdbf71f Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Wed, 10 Jul 2024 10:55:35 +0100 Subject: [PATCH 1/3] fix(threads/runs/create_and_run_stream): correct tool_resources param --- src/openai/resources/beta/threads/threads.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openai/resources/beta/threads/threads.py b/src/openai/resources/beta/threads/threads.py index a62ee8d1bb..8d3289658d 100644 --- a/src/openai/resources/beta/threads/threads.py +++ b/src/openai/resources/beta/threads/threads.py @@ -1062,7 +1062,7 @@ def create_and_run_stream( "stream": True, "thread": thread, "tools": tools, - "tool": tool_resources, + "tool_resources": tool_resources, "truncation_strategy": truncation_strategy, "top_p": top_p, }, @@ -2082,7 +2082,7 @@ def create_and_run_stream( "stream": True, "thread": thread, "tools": tools, - "tool": tool_resources, + "tool_resources": tool_resources, "truncation_strategy": truncation_strategy, "top_p": top_p, }, From 81655a012e28c0240e71cf74b77ad1f9ac630906 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:38:16 +0000 Subject: [PATCH 2/3] chore(internal): add helper function (#1538) --- src/openai/_models.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/openai/_models.py b/src/openai/_models.py index 5d95bb4b2b..eb7ce3bde9 100644 --- a/src/openai/_models.py +++ b/src/openai/_models.py @@ -643,6 +643,14 @@ def validate_type(*, type_: type[_T], value: object) -> _T: return cast(_T, _validate_non_model_type(type_=type_, value=value)) +def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None: + """Add a pydantic config for the given type. + + Note: this is a no-op on Pydantic v1. + """ + setattr(typ, "__pydantic_config__", config) # noqa: B010 + + # our use of subclasssing here causes weirdness for type checkers, # so we just pretend that we don't subclass if TYPE_CHECKING: From 6ba9ebe1e79ef605ac95d50004647f414ca7e840 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:38:47 +0000 Subject: [PATCH 3/3] release: 1.35.13 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ pyproject.toml | 2 +- src/openai/_version.py | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7ac9c7d661..cbc88f07a5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.35.12" + ".": "1.35.13" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e0be66b84..ea823dcd66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 1.35.13 (2024-07-10) + +Full Changelog: [v1.35.12...v1.35.13](https://github.com/openai/openai-python/compare/v1.35.12...v1.35.13) + +### Bug Fixes + +* **threads/runs/create_and_run_stream:** correct tool_resources param ([8effd08](https://github.com/openai/openai-python/commit/8effd08be3ab1cf509bdbfd9f174f9186fdbf71f)) + + +### Chores + +* **internal:** add helper function ([#1538](https://github.com/openai/openai-python/issues/1538)) ([81655a0](https://github.com/openai/openai-python/commit/81655a012e28c0240e71cf74b77ad1f9ac630906)) + ## 1.35.12 (2024-07-09) Full Changelog: [v1.35.11...v1.35.12](https://github.com/openai/openai-python/compare/v1.35.11...v1.35.12) diff --git a/pyproject.toml b/pyproject.toml index b81031b1fa..24fee167ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openai" -version = "1.35.12" +version = "1.35.13" description = "The official Python library for the openai API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/openai/_version.py b/src/openai/_version.py index d7cdffe676..40d6e8e31d 100644 --- a/src/openai/_version.py +++ b/src/openai/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "openai" -__version__ = "1.35.12" # x-release-please-version +__version__ = "1.35.13" # x-release-please-version