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

Fixing improper text-completion output in completion() and acompletion() #8532

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

miraclebakelaser
Copy link
Contributor

Fixing inconsistent outputs of text-completion-* models on completion() and acompletion() that would result in the unexpected output of TextCompletionResponse. Now all calls to the text-completion models will generate ModelResponse outputs, unless the text_completion kwarg is explicitly passed to the functions.

Testing - Attach a screenshot of any new tests passing locally

image

Tested with type assertions for consistent response types generation (ModelResponse) and proper handling of text_completion kwarg (TextCompletionResponse) and content validation.

Type

🐛 Bug Fix

Copy link

vercel bot commented Feb 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 7:17am

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.

1 participant