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

trunction flag is missing from /v1/chat/completions #2877

Open
2 of 4 tasks
vitalyshalumov opened this issue Jan 6, 2025 · 1 comment
Open
2 of 4 tasks

trunction flag is missing from /v1/chat/completions #2877

vitalyshalumov opened this issue Jan 6, 2025 · 1 comment

Comments

@vitalyshalumov
Copy link

System Info

I want to be able to truncate input without raising an error using /v1/chat/completions. Is this possible?

Information

  • Docker
  • The CLI directly

Tasks

  • An officially supported command
  • My own modifications

Reproduction

input that is longer than allowed

Expected behavior

truncation from the top.

@drbh
Copy link
Collaborator

drbh commented Jan 7, 2025

Hi @vitalyshalumov thanks for opening this issue, the truncate param is not available on the /v1/chat/completions endpoint, this is the case because the /v1/chat/completions aims to follow the same API as openai's chat endpoint.

would it be possible to truncate the input before calling the chat endpoint? If this does not meet your use case we can start a larger conversation about adding this param with the team; however currently we'd like to limit the params to align with openai.

Thank you!

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

No branches or pull requests

2 participants