Skip to content

Support more OpenAI API test#916

Merged
Ying1123 merged 7 commits intosgl-project:mainfrom
yichuan-w:add_openai_api_test
Aug 4, 2024
Merged

Support more OpenAI API test#916
Ying1123 merged 7 commits intosgl-project:mainfrom
yichuan-w:add_openai_api_test

Conversation

@yichuan-w
Copy link
Copy Markdown
Contributor

Thank you for your contribution, we really appreciate it. The following instructions will help improve your pull request and make it easier to receive feedback. If there are any items you don't understand, don't worry. Just submit the pull request and ask the maintainers for help.

Motivation

Support more OpenAI API tests and correspondingly make the backend more robust/ add more support

cover mostly (completion, chat_completion) x (echo, no echo) x (parallel sampling, no parallel sampling) x (stream, no stream) x (logprob, no logprob) x (single input, list input) x (str input, token id input)

Fix #910 which is caused by the conflict of PR #888 with parallel sampling and I made the backend more robust

Modification

OpenAI API test and the backend support that

Checklist

  1. Ensure pre-commit pre-commit run --all-files or other linting tools are used to fix potential lint issues.
  2. Confirm that modifications are covered by complete unit tests. If not, please add more unit tests for correctness.
  3. Modify documentation as needed, such as docstrings or example tutorials.

Comment thread python/sglang/srt/managers/tokenizer_manager.py Outdated
Comment thread python/sglang/srt/managers/io_struct.py Outdated
Comment thread python/sglang/srt/managers/io_struct.py Outdated
Comment thread python/sglang/srt/managers/tokenizer_manager.py Outdated
Comment thread python/sglang/srt/openai_api/adapter.py Outdated
Comment thread test/srt/test_openai_server.py Outdated
Comment thread test/srt/test_openai_server.py
Comment thread test/srt/test_openai_server.py Outdated
Comment thread python/sglang/srt/managers/tokenizer_manager.py
Comment thread python/sglang/srt/managers/tokenizer_manager.py
@Ying1123 Ying1123 merged commit d53dcf9 into sgl-project:main Aug 4, 2024
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
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.

[Bug] Internal Server Error with Chat Template and n > 1

4 participants