Unverified Commit 51085c2a authored by Kevin's avatar Kevin Committed by GitHub
Browse files

[Frontend] add continue_final_message parameter to /embeddings endpoint (#31497)


Signed-off-by: default avatarKevin P-W <140451262+kevin-pw@users.noreply.github.com>
parent 3d973764
...@@ -97,7 +97,16 @@ class EmbeddingChatRequest(OpenAIBaseModel): ...@@ -97,7 +97,16 @@ class EmbeddingChatRequest(OpenAIBaseModel):
"model." "model."
), ),
) )
continue_final_message: bool = Field(
default=False,
description=(
"If this is set, the chat will be formatted so that the final "
"message in the chat is open-ended, without any EOS tokens. The "
"model will continue this message rather than starting a new one. "
'This allows you to "prefill" part of the model\'s response for it. '
"Cannot be used at the same time as `add_generation_prompt`."
),
)
add_special_tokens: bool = Field( add_special_tokens: bool = Field(
default=False, default=False,
description=( description=(
......
...@@ -89,7 +89,7 @@ class EmbeddingMixin(OpenAIServing): ...@@ -89,7 +89,7 @@ class EmbeddingMixin(OpenAIServing):
chat_template=ctx.request.chat_template or ctx.chat_template, chat_template=ctx.request.chat_template or ctx.chat_template,
chat_template_content_format=ctx.chat_template_content_format, chat_template_content_format=ctx.chat_template_content_format,
add_generation_prompt=ctx.request.add_generation_prompt, add_generation_prompt=ctx.request.add_generation_prompt,
continue_final_message=False, continue_final_message=ctx.request.continue_final_message,
add_special_tokens=ctx.request.add_special_tokens, add_special_tokens=ctx.request.add_special_tokens,
) )
else: else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment