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

Fix how stream flag is read from request #1441

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

mreso
Copy link
Contributor

@mreso mreso commented Dec 23, 2024

This PR fixes how the stream flag is read from a request. Sending a request like:

curl http://localhost:5000/v1/chat/completions   -H "Content-Type: application/json"   -d '{
    "model": "llama3.1",
    "stream": "False",
    "max_tokens": 200,
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }'

currently results in a streaming response as a non-empty string (like 'False') is interpreted by bool() as True.

Copy link

pytorch-bot bot commented Dec 23, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchchat/1441

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Pending, 1 Unrelated Failure

As of commit 6065e37 with merge base 68b8087 (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@mreso mreso requested review from Jack-Khuu and vmpuri December 23, 2024 22:07
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 23, 2024
Copy link
Contributor

@Jack-Khuu Jack-Khuu left a comment

Choose a reason for hiding this comment

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

Thanks

@Jack-Khuu Jack-Khuu merged commit 019f76f into pytorch:main Dec 25, 2024
51 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants