- Update to 1.59.1:

* bump license year (#1981) (f29011a)
- Update to 1.59.0:
  * azure: support for the Realtime API (#1963) (9fda141)
  * realtime: update docstrings (#1964) (3dee863)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-openai?expand=0&rev=19
This commit is contained in:
2025-01-06 04:25:56 +00:00
committed by Git OBS Bridge
commit 9fe7e85729
7 changed files with 272 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
openai-1.14.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:08e8ba2c3e9388054033b33f674a0b6be67d954d4bad5d55ae49db7594aee121
size 206298

3
openai-1.40.8.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e225f830b946378e214c5b2cfa8df28ba2aeb7e9d44f738cb2a926fd971f5bc0
size 287219

3
openai-1.59.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7b2e6e9e4777534e5258b993edd22978a72b57357f53fcb3c6773c499ef12392
size 353308

128
python-openai.changes Normal file
View File

@@ -0,0 +1,128 @@
-------------------------------------------------------------------
Fri Jan 3 13:46:26 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- Update to 1.59.1:
* bump license year (#1981) (f29011a)
- Update to 1.59.0:
* azure: support for the Realtime API (#1963) (9fda141)
* realtime: update docstrings (#1964) (3dee863)
-------------------------------------------------------------------
Thu Sep 19 07:33:34 UTC 2024 - Markéta Machová <mmachova@suse.com>
- Add missing dependency
-------------------------------------------------------------------
Thu Sep 5 15:50:04 UTC 2024 - Guang Yee <gyee@suse.com>
- Enable sle15_python_module_pythons.
-------------------------------------------------------------------
Wed Aug 21 04:07:02 UTC 2024 - Guang Yee <gyee@suse.com>
- update to 1.40.8
* types: define FilePurpose enum (#1653) (3c2eeae)
-------------------------------------------------------------------
Sat Mar 23 12:06:17 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 1.14.2:
* cache TypeAdapters
* cache TypeAdapters
* assistant improvements
* fix typo in CONTRIBUTING.md
-------------------------------------------------------------------
Sat Mar 16 08:54:28 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 1.14.0:
* **assistants:** add support for streaming
* **streaming:** improve error messages
-------------------------------------------------------------------
Mon Mar 11 21:21:09 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Update to 1.13.3
## Features
* api: add wav and pcm to response_format (#1189) (dbd20fc)
## Chores
* client: use anyio.sleep instead of asyncio.sleep (#1198)
(b6d025b)
* internal: bump pyright (#1193) (9202e04)
* types: extract run status to a named type (#1178) (249ecbd)
- Release 1.13.2
## Bug Fixes
* ci: revert "move github release logic to github app" (#1170)
(f1adc2e)
- Release 1.13.1
## Chores
* internal: bump rye to v0.24.0 (#1168) (84c4256)
- Release 1.13.0
## Features
* api: updates (#1146) (79b7675)
## Bug Fixes
* api: remove non-GA instance_id param (#1164) (1abe139)
## Chores
* client: use correct accept headers for binary data (#1161)
(e536437)
- Release 1.12.0
## Features
* api: add timestamp_granularities, add gpt-3.5-turbo-0125 model
(#1125) (1ecf8f6)
* cli/images: add support for --model arg (#1132) (0d53866)
## Bug Fixes
* remove double brackets from timestamp_granularities param
(#1140) (3db0222)
* types: loosen most List params types to Iterable (#1129)
(bdb31a3)
## Chores
* internal: add lint command (#1128) (4c021c0)
* internal: support serialising iterable types (#1127) (98d4e59)
- Restrict to pytest-asyncio < 0.23
- Fix License tag: They changed it for release 1.0.0 gh#openai/openai-python#677
-------------------------------------------------------------------
Fri Jan 26 12:54:53 UTC 2024 - Markéta Machová <mmachova@suse.com>, Module Updater <pgajdos@suse.com>
- Update to 1.10.0
* Auto-retry with backoff if there's an error
* Proper types (for mypy/pyright/editors)
* You can now instantiate a client, instead of using a global default.
* Switch to explicit client instantiation
* Weights and Biases CLI will now be included in their own package
* many more smaller changes, see https://github.com/openai/openai-python/blob/main/CHANGELOG.md
- Use an upstream tarball and run at least some tests
-------------------------------------------------------------------
Mon Jul 24 20:18:16 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 0.27.8:
* Periodically close open `request.Sessions` to avoid buggy
interaction with Docker Desktop
* Support for Azure Dall-e
* Embeddings util - remove unnecessary sort by index
* allow api_version to be set by environment variable
* Fixed CLI streamed chat completions.
* Update README to use gpt-3.5-turbo by default
* Updating code and readme to reference the Azure's newest
2023-05-15 API Version
* allow for passing requests.Session
* fix error messages mentioning support@
* Speed up imports
* Add proxy argument support for openai client
* Add `__version__` in `__init__.py`
* Fix grabbing value out of header
* add case to handle indented .json parsing (#175)
* Add `openai/datalib/__init__.py`
* updated the link for OpenAI API
-------------------------------------------------------------------
Thu Jan 26 10:13:45 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Clean up the SPEC file.
-------------------------------------------------------------------
Thu Jan 26 07:29:00 UTC 2023 - Adrian Schröter <adrian@suse.de>
- initial package of version 0.26.2

111
python-openai.spec Normal file
View File

@@ -0,0 +1,111 @@
#
# spec file for package python-openai
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-openai
Version: 1.59.1
Release: 0
Summary: OpenAI bindings for python
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/openai/openai-python
Source: https://github.com/openai/openai-python/archive/refs/tags/v%{version}.tar.gz#/openai-%{version}.tar.gz
BuildRequires: %{python_module hatch-fancy-pypi-readme}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-anyio >= 3.5.0
Requires: python-distro >= 1.7.0
Requires: python-httpx >= 0.23.0
Requires: python-jiter >= 0.4.0
Requires: python-pydantic >= 1.9.0
Requires: python-sniffio
Requires: python-tqdm > 4
Requires: python-typing_extensions
Requires(post): update-alternatives
Requires(postun): update-alternatives
# SECTION test-requirements
BuildRequires: %{python_module dirty-equals >= 0.6.0}
BuildRequires: %{python_module distro >= 1.7.0}
BuildRequires: %{python_module httpx >= 0.23.0}
BuildRequires: %{python_module importlib-metadata >= 6.7.0}
BuildRequires: %{python_module inline-snapshot >= 0.7.0}
BuildRequires: %{python_module jiter}
BuildRequires: %{python_module mypy}
BuildRequires: %{python_module nest-asyncio}
BuildRequires: %{python_module pydantic}
BuildRequires: %{python_module pyright >= 1.1.359}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module respx}
BuildRequires: %{python_module rich >= 13.7.1}
BuildRequires: %{python_module time-machine}
BuildRequires: %{python_module toml}
BuildRequires: %{python_module tqdm}
BuildRequires: %{python_module trio >= 0.22.2}
BuildRequires: %{python_module typing_extensions}
# /SECTION
BuildArch: noarch
%python_subpackages
%description
The OpenAI Python library provides convenient access to the OpenAI API
from applications written in the Python language. It includes a
pre-defined set of classes for API resources that initialize
themselves dynamically from API responses which makes it compatible
with a wide range of versions of the OpenAI API.
You can find usage examples for the OpenAI Python library in
https://beta.openai.com/docs/api-reference?lang=python
https://github.com/openai/openai-cookbook/.
%prep
%autosetup -p1 -n openai-python-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/openai
%check
# most of tests/api_resources need registered API key
# test_streaming_response needs network connection
# test_copy_build_request needs "warmed up" machinery and OBS starts always fresh
# test_basic_attribute_access_works needs network connection
# NOTE: Also, "tests/lib/chat/test_completions_streaming.py" required static snapshot
# files (./.inline_snapshop/external) which are *not included* in the tarball so we need to deselect those tests.
# NOTE: disable tests with the "asyncio" marker because they required pluggy version 1.3.0 or older
%pytest --ignore "tests/api_resources" --ignore "tests/lib/chat/test_completions_streaming.py" -m "not asyncio" -k "not (test_streaming_response or test_copy_build_request or test_basic_attribute_access_works)"
%post
%python_install_alternative openai
%postun
%python_uninstall_alternative openai
%files %{python_files}
%python_alternative %{_bindir}/openai
%{python_sitelib}/openai
%{python_sitelib}/openai-%{version}.dist-info
%changelog