Skip to content

OpenAI API format support - #50

Open
RomaA2000 wants to merge 5 commits into
petals-infra:mainfrom
RomaA2000:openai_api
Open

OpenAI API format support#50
RomaA2000 wants to merge 5 commits into
petals-infra:mainfrom
RomaA2000:openai_api

Conversation

@RomaA2000

Copy link
Copy Markdown

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
Comment thread openai_api.py
usage=usage,
)

if request.stream:

Copy link
Copy Markdown
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?

@RomaA2000 RomaA2000 Dec 4, 2023

Copy link
Copy Markdown
Author

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).

Comment thread 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

LGTM

@softmix

softmix commented Mar 29, 2024

Copy link
Copy Markdown

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