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

OpenAI API format support #50

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

RomaA2000
Copy link

No description provided.

@RomaA2000 RomaA2000 changed the title feat: open ai api OpenAI API format support Nov 14, 2023
@RomaA2000 RomaA2000 changed the title OpenAI API format support DRAFT: OpenAI API format support Nov 14, 2023
@RomaA2000 RomaA2000 marked this pull request as draft November 14, 2023 16:40
@RomaA2000 RomaA2000 marked this pull request as ready for review November 27, 2023 14:54
@RomaA2000 RomaA2000 changed the title DRAFT: OpenAI API format support OpenAI API format support Nov 27, 2023
usage=usage,
)

if request.stream:
Copy link
Collaborator

Choose a reason for hiding this comment

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

May be it's better to send unprocesseble entity? How openai answering when you choose choices with streaming?

Copy link
Author

@RomaA2000 RomaA2000 Dec 4, 2023

Choose a reason for hiding this comment

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

Because of OpenAI documentation, it is mandatory to send data like streaming if streaming is enabled (the stream terminated by a data: [DONE] message).

openai_api.py Outdated
- suffix (the language models we currently support do not support
suffix)
- logit_bias (to be supported by Petals engine)
- stream (to be supported by Petals engine)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is stream is not supported? 🤨

Copy link
Collaborator

Choose a reason for hiding this comment

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

Docstring and code are not aligned with each other.

Copy link
Author

Choose a reason for hiding this comment

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

Updated docstring info

@artek0chumak
Copy link
Collaborator

LGTM

@softmix
Copy link

softmix commented Mar 29, 2024

what's needed for this to be merged?

@softmix softmix mentioned this pull request Mar 29, 2024
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