Skip to content

release: 1.24.0 #1376

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 29, 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.23.6"
".": "1.24.0"
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 1.24.0 (2024-04-29)

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

### Features

* **api:** add required tool_choice ([#1382](https://github.com/openai/openai-python/issues/1382)) ([c558f65](https://github.com/openai/openai-python/commit/c558f651df39f61425cd4109318f78ed94cbf163))


### Chores

* **client:** log response headers in debug mode ([#1383](https://github.com/openai/openai-python/issues/1383)) ([f31a426](https://github.com/openai/openai-python/commit/f31a4261adc4ebd92582cee264e41eb6a6dafc57))
* **internal:** minor reformatting ([#1377](https://github.com/openai/openai-python/issues/1377)) ([7003dbb](https://github.com/openai/openai-python/commit/7003dbb863b6e16381070b8b86ac24aa070a3799))
* **internal:** reformat imports ([#1375](https://github.com/openai/openai-python/issues/1375)) ([2ad0c3b](https://github.com/openai/openai-python/commit/2ad0c3b8e0b746ed20db3c84a9c6a369aa10bf5d))

## 1.23.6 (2024-04-25)

Full Changelog: [v1.23.5...v1.23.6](https://github.com/openai/openai-python/compare/v1.23.5...v1.23.6)
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.23.6"
version = "1.24.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
10 changes: 9 additions & 1 deletion src/openai/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,8 @@ def _request(
if self.custom_auth is not None:
kwargs["auth"] = self.custom_auth

log.debug("Sending HTTP Request: %s %s", request.method, request.url)

try:
response = self._client.send(
request,
Expand Down Expand Up @@ -984,8 +986,14 @@ def _request(
raise APIConnectionError(request=request) from err

log.debug(
'HTTP Request: %s %s "%i %s"', request.method, request.url, response.status_code, response.reason_phrase
'HTTP Response: %s %s "%i %s" %s',
request.method,
request.url,
response.status_code,
response.reason_phrase,
response.headers,
)
log.debug("request_id: %s", response.headers.get("x-request-id"))

try:
response.raise_for_status()
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.23.6" # x-release-please-version
__version__ = "1.24.0" # x-release-please-version
30 changes: 18 additions & 12 deletions src/openai/resources/beta/threads/runs/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ def create(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down Expand Up @@ -330,8 +331,9 @@ def create(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down Expand Up @@ -473,8 +475,9 @@ def create(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down Expand Up @@ -1716,8 +1719,9 @@ async def create(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down Expand Up @@ -1859,8 +1863,9 @@ async def create(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down Expand Up @@ -2002,8 +2007,9 @@ async def create(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down
30 changes: 18 additions & 12 deletions src/openai/resources/beta/threads/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,9 @@ def create_and_run(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down Expand Up @@ -507,8 +508,9 @@ def create_and_run(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down Expand Up @@ -649,8 +651,9 @@ def create_and_run(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down Expand Up @@ -1336,8 +1339,9 @@ async def create_and_run(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down Expand Up @@ -1478,8 +1482,9 @@ async def create_and_run(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down Expand Up @@ -1620,8 +1625,9 @@ async def create_and_run(

tool_choice: Controls which (if any) tool is called by the model. `none` means the model will
not call any tools and instead generates a message. `auto` is the default value
and means the model can pick between generating a message or calling a tool.
Specifying a particular tool like `{"type": "file_search"}` or
and means the model can pick between generating a message or calling one or more
tools. `required` means the model must call one or more tools before responding
to the user. Specifying a particular tool like `{"type": "file_search"}` or
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
call that tool.

Expand Down
Loading