Skip to content

fix: chat completion with more than one choice #2288

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

Merged
merged 1 commit into from
May 27, 2025

Conversation

ehhuang
Copy link
Contributor

@ehhuang ehhuang commented May 27, 2025

What does this PR do?

Fix a bug in openai_compat where choices are not indexed correctly.

Test Plan

Added a new test.

Rerun the failed inference_store tests:
llama stack run fireworks --image-type conda
pytest -s -v tests/integration/ --stack-config http://localhost:8321 -k 'test_inference_store' --text-model meta-llama/Llama-3.3-70B-Instruct --count 10

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 27, 2025
@ehhuang ehhuang marked this pull request as ready for review May 27, 2025 20:37
@ehhuang ehhuang force-pushed the pr2288 branch 2 times, most recently from 01ccfaa to 5c580c3 Compare May 27, 2025 20:38
@@ -1377,6 +1377,7 @@ async def openai_chat_completion(
outstanding_responses = []
# "n" is the number of completions to generate per prompt
n = n or 1
print(f"n: {n}")
Copy link
Contributor

Choose a reason for hiding this comment

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

remove?

@ehhuang ehhuang force-pushed the pr2288 branch 4 times, most recently from e2cd42f to 6dc8215 Compare May 27, 2025 21:33
# What does this PR do?


## Test Plan
@ehhuang ehhuang merged commit 0b69553 into meta-llama:main May 27, 2025
43 of 49 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