Skip to content
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

Broken Package: python3-openai / Package Request: python3-jiter #53735

Open
ananteris opened this issue Dec 28, 2024 · 1 comment
Open

Broken Package: python3-openai / Package Request: python3-jiter #53735

ananteris opened this issue Dec 28, 2024 · 1 comment
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed

Comments

@ananteris
Copy link
Contributor

Is this a new report?

Yes

System Info

Void 6.6.61_1 x86_64 GenuineIntel notuptodate rrrrmdFFFFFFF

Package(s) Affected

python3-openai 1.12.0_2

Does a report exist for this bug with the project's home (upstream) and/or another distro?

No response

Expected behaviour

The python library should be compatible with the last package revision.

Actual behaviour

Attempting to use the API will result in a python failure:

Traceback (most recent call last):
  File "/usr/local/bin/ai", line 7, in <module>
    client = OpenAI(
      api_key="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    )
  File "/usr/lib/python3.13/site-packages/openai/_client.py", line 112, in __init__
    super().__init__(
    ~~~~~~~~~~~~~~~~^
        version=__version__,
        ^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
        _strict_response_validation=_strict_response_validation,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.13/site-packages/openai/_base_client.py", line 793, in __init__
    self._client = http_client or SyncHttpxClientWrapper(
                                  ~~~~~~~~~~~~~~~~~~~~~~^
        base_url=base_url,
        ^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
        follow_redirects=True,
        ^^^^^^^^^^^^^^^^^^^^^^
    )
    ^

I am attempting to get a working update for python3-openai however there is a new dependency for python3-jiter using cargo/rust which I am not particularly familiar with. If anyone is familiar with cargo/rust packages and would take a shot at it I would greatly appreciate it. In the mean time the package is broken, I will attempt to work at it some over the holidays.

Steps to reproduce

  1. Do the install python3-openai thing
  2. Try to initialize an OpenAI client
client = OpenAI(
  api_key="sk-yourtotallyvalidopenaiapikey",
)
  1. Run it
@ananteris ananteris added bug Something isn't working needs-testing Testing a PR or reproducing an issue needed labels Dec 28, 2024
@Eloitor
Copy link
Contributor

Eloitor commented Dec 29, 2024

I'd like to have python3-openai. Meanwhile you can use uv to use it in a local environment:

uv add --script ai.py openai
uv run ai.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed
Projects
None yet
Development

No branches or pull requests

2 participants