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 response type for /v1/chat/completions and /v1/completions #1747

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Apr 15, 2024

/v1/chat/completions and /v1/completions have different output types depending on the stream parameter. This PR aims at fixing the inconsistency in the auto-generated openapi.json specs.

cc @OlivierDehaene @drbh I reused what had been done for the / endpoint but haven't tested anything myself. Could you confirm this is the correct way of handling things?

Also, should I update the openapi.json file manually? If yes, how can I do it?

`/v1/chat/completions` and `/v1/completions` have different output types depending on the `stream` parameter. This PR aims at fixing the inconsistency in the auto-generated [openapi.json](https://huggingface.github.io/text-generation-inference/openapi.json) specs.

cc @OlivierDehaene @drbh I reused what had been done for the `/` endpoint but haven't tested anything myself. Could you confirm this is the correct way of handling things?

Also, should I update the openapi.json file manually? If yes, how can I do it?
Copy link
Member

@OlivierDehaene OlivierDehaene left a comment

Choose a reason for hiding this comment

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

Thanks
I will update the json myself afterwards.

Copy link
Collaborator

@drbh drbh left a comment

Choose a reason for hiding this comment

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

thank you both!

@Wauplin
Copy link
Contributor Author

Wauplin commented Apr 16, 2024

Thanks for the reviews! Is it safe to merge? CI is failing with

ERROR integration-tests/models/test_flash_awq.py::test_flash_llama_awq - RuntimeError: Health check failed
ERROR integration-tests/models/test_flash_awq.py::test_flash_llama_awq_all_params - RuntimeError: Health check failed
ERROR integration-tests/models/test_flash_awq.py::test_flash_llama_awq_load - RuntimeError: Health check failed

@Wauplin Wauplin merged commit 00f3653 into main Apr 16, 2024
6 of 7 checks passed
@Wauplin Wauplin deleted the Wauplin-patch-1 branch April 16, 2024 17:26
Nilabhra pushed a commit to TII-AI-Research-Center/text-generation-inference that referenced this pull request May 14, 2024
…huggingface#1747)

`/v1/chat/completions` and `/v1/completions` have different output types
depending on the `stream` parameter. This PR aims at fixing the
inconsistency in the auto-generated
[openapi.json](https://huggingface.github.io/text-generation-inference/openapi.json)
specs.

cc @OlivierDehaene @drbh I reused what had been done for the `/`
endpoint but haven't tested anything myself. Could you confirm this is
the correct way of handling things?

Also, should I update the openapi.json file manually? If yes, how can I
do it?
kdamaszk pushed a commit to kdamaszk/tgi-gaudi that referenced this pull request May 27, 2024
…huggingface#1747)

`/v1/chat/completions` and `/v1/completions` have different output types
depending on the `stream` parameter. This PR aims at fixing the
inconsistency in the auto-generated
[openapi.json](https://huggingface.github.io/text-generation-inference/openapi.json)
specs.

cc @OlivierDehaene @drbh I reused what had been done for the `/`
endpoint but haven't tested anything myself. Could you confirm this is
the correct way of handling things?

Also, should I update the openapi.json file manually? If yes, how can I
do it?
kdamaszk pushed a commit to kdamaszk/tgi-gaudi that referenced this pull request Jun 3, 2024
…huggingface#1747)

`/v1/chat/completions` and `/v1/completions` have different output types
depending on the `stream` parameter. This PR aims at fixing the
inconsistency in the auto-generated
[openapi.json](https://huggingface.github.io/text-generation-inference/openapi.json)
specs.

cc @OlivierDehaene @drbh I reused what had been done for the `/`
endpoint but haven't tested anything myself. Could you confirm this is
the correct way of handling things?

Also, should I update the openapi.json file manually? If yes, how can I
do it?
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.

None yet

3 participants