Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

release: 1.40.6 #1641

Merged
merged 5 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.40.5"
".": "1.40.6"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 68
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-97797a9363b9960b5f2fbdc84426a2b91e75533ecd409fe99e37c231180a4339.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-285bce7dcdae7eea5fe84a8d6e5af2c1473d65ea193109370fb2257851eef7eb.yml
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 1.40.6 (2024-08-12)

Full Changelog: [v1.40.5...v1.40.6](https://github.com/openai/openai-python/compare/v1.40.5...v1.40.6)

### Chores

* **examples:** minor formatting changes ([#1644](https://github.com/openai/openai-python/issues/1644)) ([e08acf1](https://github.com/openai/openai-python/commit/e08acf1c6edd1501ed70c4634cd884ab1658af0d))
* **internal:** update some imports ([#1642](https://github.com/openai/openai-python/issues/1642)) ([fce1ea7](https://github.com/openai/openai-python/commit/fce1ea72a89ba2737bc77775fe04f3a21ecb28e7))
* sync openapi url ([#1646](https://github.com/openai/openai-python/issues/1646)) ([8ae3801](https://github.com/openai/openai-python/commit/8ae380123ada0bfaca9961e222a0e9c8b585e2d4))
* **tests:** fix pydantic v1 tests ([2623630](https://github.com/openai/openai-python/commit/26236303f0f6de5df887e8ee3e41d5bc39a3abb1))

## 1.40.5 (2024-08-12)

Full Changelog: [v1.40.4...v1.40.5](https://github.com/openai/openai-python/compare/v1.40.4...v1.40.5)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openai"
version = "1.40.5"
version = "1.40.6"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openai"
__version__ = "1.40.5" # x-release-please-version
__version__ = "1.40.6" # x-release-please-version
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
from typing import Union
from typing_extensions import Literal, TypeAlias

from ...types import shared_params
from ..shared_params.response_format_text import ResponseFormatText
from ..shared_params.response_format_json_object import ResponseFormatJSONObject
from ..shared_params.response_format_json_schema import ResponseFormatJSONSchema

__all__ = ["AssistantResponseFormatOptionParam"]

AssistantResponseFormatOptionParam: TypeAlias = Union[
Literal["auto"],
shared_params.ResponseFormatText,
shared_params.ResponseFormatJSONObject,
shared_params.ResponseFormatJSONSchema,
Literal["auto"], ResponseFormatText, ResponseFormatJSONObject, ResponseFormatJSONSchema
]
4 changes: 2 additions & 2 deletions src/openai/types/beta/function_tool_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

from typing_extensions import Literal, Required, TypedDict

from ...types import shared_params
from ..shared_params.function_definition import FunctionDefinition

__all__ = ["FunctionToolParam"]


class FunctionToolParam(TypedDict, total=False):
function: Required[shared_params.FunctionDefinition]
function: Required[FunctionDefinition]

type: Required[Literal["function"]]
"""The type of tool being defined: `function`"""
4 changes: 2 additions & 2 deletions src/openai/types/chat/chat_completion_tool_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

from typing_extensions import Literal, Required, TypedDict

from ...types import shared_params
from ..shared_params.function_definition import FunctionDefinition

__all__ = ["ChatCompletionToolParam"]


class ChatCompletionToolParam(TypedDict, total=False):
function: Required[shared_params.FunctionDefinition]
function: Required[FunctionDefinition]

type: Required[Literal["function"]]
"""The type of the tool. Currently, only `function` is supported."""
11 changes: 6 additions & 5 deletions src/openai/types/chat/completion_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
from typing import Dict, List, Union, Iterable, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict

from ...types import shared_params
from ..chat_model import ChatModel
from .chat_completion_tool_param import ChatCompletionToolParam
from .chat_completion_message_param import ChatCompletionMessageParam
from ..shared_params.function_parameters import FunctionParameters
from ..shared_params.response_format_text import ResponseFormatText
from .chat_completion_stream_options_param import ChatCompletionStreamOptionsParam
from .chat_completion_tool_choice_option_param import ChatCompletionToolChoiceOptionParam
from ..shared_params.response_format_json_object import ResponseFormatJSONObject
from ..shared_params.response_format_json_schema import ResponseFormatJSONSchema
from .chat_completion_function_call_option_param import ChatCompletionFunctionCallOptionParam

__all__ = [
Expand Down Expand Up @@ -244,7 +247,7 @@ class Function(TypedDict, total=False):
how to call the function.
"""

parameters: shared_params.FunctionParameters
parameters: FunctionParameters
"""The parameters the functions accepts, described as a JSON Schema object.

See the [guide](https://platform.openai.com/docs/guides/function-calling) for
Expand All @@ -256,9 +259,7 @@ class Function(TypedDict, total=False):
"""


ResponseFormat: TypeAlias = Union[
shared_params.ResponseFormatText, shared_params.ResponseFormatJSONObject, shared_params.ResponseFormatJSONSchema
]
ResponseFormat: TypeAlias = Union[ResponseFormatText, ResponseFormatJSONObject, ResponseFormatJSONSchema]


class CompletionCreateParamsNonStreaming(CompletionCreateParamsBase):
Expand Down
4 changes: 2 additions & 2 deletions src/openai/types/shared_params/function_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Optional
from typing_extensions import Required, TypedDict

from ...types import shared_params
from .function_parameters import FunctionParameters

__all__ = ["FunctionDefinition"]

Expand All @@ -24,7 +24,7 @@ class FunctionDefinition(TypedDict, total=False):
how to call the function.
"""

parameters: shared_params.FunctionParameters
parameters: FunctionParameters
"""The parameters the functions accepts, described as a JSON Schema object.

See the [guide](https://platform.openai.com/docs/guides/function-calling) for
Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/beta/test_assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None:
"vector_store_ids": ["string"],
"vector_stores": [
{
"file_ids": ["string", "string", "string"],
"chunking_strategy": {"type": "auto"},
"file_ids": ["string", "string", "string"],
"metadata": {},
}
],
Expand Down Expand Up @@ -276,8 +276,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) ->
"vector_store_ids": ["string"],
"vector_stores": [
{
"file_ids": ["string", "string", "string"],
"chunking_strategy": {"type": "auto"},
"file_ids": ["string", "string", "string"],
"metadata": {},
}
],
Expand Down
Loading