-
Notifications
You must be signed in to change notification settings - Fork 376
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
feat:Add rest call support similar to oepn-api style #81
Conversation
You're such a goat! Thank you 🙏 |
I tested it with deepseek url from openai import OpenAI client = OpenAI(api_key="", base_url="https://api.deepseek.com") response = client.chat.completions.create( print(response.choices[0].message.content) |
a tip: this commit doesn't implement stream transmission. |
Yes, for this to be useful it should stream the text from the API and create TTS for each chunked text stream. Too much lag if you have to wait for generation of the entire message. There is an example of how streaming can be implemented in OpenAI Python library: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks @wuhongsheng ! 🙏🤗
This will definitely meet a relevant use case.
Almost ready to merge, it just needs to handle the --open_api_stream
flag. The suggestion given below to handle it has been tested using --whisper_mlx
and --melo
, works fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add sent_tokenize
Co-authored-by: eustlb <[email protected]>
Hey @wuhongsheng, thanks for iterating. Nevertheless, you have not committed suggested changes to handle the |
Co-authored-by: eustlb <[email protected]>
LGTM! Thanks for the good work 🤗 |
No description provided.