Skip to content

Do not require jiter to avoid dependency on Rust #2102

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

Closed
1 task done
barracuda156 opened this issue Feb 7, 2025 · 1 comment
Closed
1 task done

Do not require jiter to avoid dependency on Rust #2102

barracuda156 opened this issue Feb 7, 2025 · 1 comment

Comments

@barracuda156
Copy link

Confirm this is a feature request for the Python library and not the underlying OpenAI API.

  • This is a feature request for the Python library

Describe the feature or improvement you're requesting

Is it possible to make dependency on jiter optional? pydantic 1.x exists in rust-free version, and this project supports pydantic 1.9.x:

"pydantic>=1.9.0, <3",

It will be nice to avoid requiring Rust here.

Additional context

Rust is a very heavy dependency to build. Also, it is not supported on a number of non-mainstream platforms, where Python 3.x works fine.

@RobertCraigie
Copy link
Collaborator

RobertCraigie commented Feb 17, 2025

Unfortunately we can't really change how this works without causing breaking changes. For now I'd recommend trying to work around this in some way by providing your own jiter implementation that just raises an error

# jiter.py
def from_json(*args, **kwargs):
  raise NotImplementedError('jiter is not available')

Of course then you can't use the parsing helpers but you should be able to use the rest of the SDK.

@RobertCraigie RobertCraigie closed this as not planned Won't fix, can't repro, duplicate, stale Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants