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

Update requirements.txt to httpx version compatible with proxies keyword #26

Closed
wants to merge 1 commit into from

Conversation

bklieger-groq
Copy link

Trying to run any apps with the current or earlier version of xRx and Groq for STT will cause an error due to a dependency issue.

There was a breaking change in ​httpx​ v0.28.0 that impacts Groq library. The ​proxies​ parameter was removed in this version, which impacts SDK functionality.

When httpx is v0.28.0 or later, Groq library gives error TypeError: Client.__init__() got an unexpected keyword argument 'proxies'. So running any app gives the following error when trying to use Groq for STT:

Result:

xrx-stt           |     model = self.get_model()  # Get the shared model instance
xrx-stt           |   File "/stt/groq_stt.py", line 22, in get_model
xrx-stt           |     cls._model = Groq(api_key=API_KEY)
xrx-stt           |   File "/usr/local/lib/python3.10/site-packages/groq/_client.py", line 99, in __init__
xrx-stt           |     super().__init__(
xrx-stt           |   File "/usr/local/lib/python3.10/site-packages/groq/_base_client.py", line 824, in __init__
xrx-stt           |     self._client = http_client or SyncHttpxClientWrapper(
xrx-stt           |   File "/usr/local/lib/python3.10/site-packages/groq/_base_client.py", line 722, in __init__
xrx-stt           |     super().__init__(**kwargs)
xrx-stt           | TypeError: Client.__init__() got an unexpected keyword argument 'proxies'```

Fix:
The fix is simple. We install latest version of httpx still compatible with other dependencies in the package. (`httpx==0.27.2`). This was the version likely used when the framework was developed but was not set in the requirements.txt. The issue is resolved with this change.

Signed-off-by: Benjamin Klieger <bklieger@groq.com>
Copy link
Contributor

@sabbyanandan sabbyanandan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go!

@sabbyanandan sabbyanandan requested a review from mprast December 19, 2024 19:20
@mprast
Copy link
Collaborator

mprast commented Dec 19, 2024

thanks for getting this @bklieger-groq, looks good

@mprast mprast mentioned this pull request Dec 19, 2024
@mprast
Copy link
Collaborator

mprast commented Dec 19, 2024

per our offline conversation, we're going to opt to upgrade groq instead of downgrading httpx. closing in favor of #27

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

Successfully merging this pull request may close these issues.

3 participants