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

fix: pop out greptimeai keyword args #135

Merged
merged 4 commits into from
Dec 26, 2023
Merged

Conversation

yuanbohan
Copy link
Contributor

ERROR:app:Exception on /openai/audio/speech [POST]
Traceback (most recent call last):
  File "/Users/yuanbohan/workspace/github.com/greptimeai-cookbook/examples/openai/.venv/lib/python3.11/site-packages/flask/app.py", line 1455, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yuanbohan/workspace/github.com/greptimeai-cookbook/examples/openai/.venv/lib/python3.11/site-packages/flask/app.py", line 869, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yuanbohan/workspace/github.com/greptimeai-cookbook/examples/openai/.venv/lib/python3.11/site-packages/flask/app.py", line 867, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yuanbohan/workspace/github.com/greptimeai-cookbook/examples/openai/.venv/lib/python3.11/site-packages/flask/app.py", line 852, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yuanbohan/workspace/github.com/greptimeai-cookbook/examples/openai/src/openai_example/app.py", line 32, in audio
    return audio_speech(message, user_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yuanbohan/workspace/github.com/greptimeai-cookbook/examples/openai/src/openai_example/__init__.py", line 88, in audio_speech
    resp = client.audio.speech.create(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/yuanbohan/workspace/github.com/greptimeai-cookbook/examples/openai/.venv/lib/python3.11/site-packages/greptimeai/patcher/openai_patcher/base.py", line 144, in wrapper
    raise e
  File "/Users/yuanbohan/workspace/github.com/greptimeai-cookbook/examples/openai/.venv/lib/python3.11/site-packages/greptimeai/patcher/openai_patcher/base.py", line 141, in wrapper
    resp = func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
TypeError: Speech.create() got an unexpected keyword argument 'user_id'
INFO:werkzeug:127.0.0.1 - - [26/Dec/2023 11:08:35] "POST /openai/audio/speech HTTP/1.1" 500 -

@yuanbohan yuanbohan force-pushed the fix-unexpected-keyword-args branch 3 times, most recently from 80af32d to 3382f9a Compare December 26, 2023 05:53
@yuanbohan yuanbohan force-pushed the fix-unexpected-keyword-args branch 3 times, most recently from 63f403e to 9296515 Compare December 26, 2023 07:45
@yuanbohan yuanbohan merged commit a22674b into main Dec 26, 2023
5 checks passed
@yuanbohan yuanbohan deleted the fix-unexpected-keyword-args branch December 26, 2023 08:42
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.

2 participants