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

Chat completion chunk object #93

Merged
merged 3 commits into from
Jan 24, 2025
Merged

Chat completion chunk object #93

merged 3 commits into from
Jan 24, 2025

Conversation

vidas
Copy link
Member

@vidas vidas commented Jan 24, 2025

Added "developer" role in messages (closes #75).

Implemented/tested chat chunk completion object attributes (closes #77 (choices), #80 (index), #81 (logprobs), #85 (usage).

Fixed bug where top_logprobs would occasionally include one more token than expected (llama-cpp-python used to include the sampled token among top_logprobs).

Radically refactored tests:

  • made them more localized (i.e. everything about the individual test is in one place)
  • simplified prompts to be only large enough to cover tests cases
  • remove some duplication
  • other improvements

Vidas added 3 commits January 23, 2025 22:02
OpenAI doesn't include sampled token
into top_logprobs if it's not there.
We should do the same.
Add tests to remaining chat completion response
chunk attributes.

Refactor most of the tests:
- remove non-local references
- remove unused parametrization
- separate deafult and streamed output tests
  (as the implementations are separate)
- collect related test together
- optimize prompts
- remove duplicate tests
@vidas vidas self-assigned this Jan 24, 2025
@vidas vidas merged commit 0541255 into main Jan 24, 2025
1 check passed
@vidas vidas deleted the chat-completion-chunk branch January 24, 2025 11:32
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.

choices Add new role to message method (developer)
1 participant