Support add_generation_prompt in embeddings endpoint with chat request (#23931)

Signed-off-by: biba10 <jaksmid@seznam.cz>
This commit is contained in:
Jakub Smid
2025-09-03 10:47:55 +00:00
committed by GitHub
parent 51383bd472
commit 28f350e147
2 changed files with 9 additions and 3 deletions
+1 -3
View File
@@ -93,9 +93,7 @@ class EmbeddingMixin(OpenAIServing):
or ctx.chat_template,
chat_template_content_format=ctx.
chat_template_content_format,
# In embedding requests, we are not generating tokens,
# so there is no need to append extra tokens to the input
add_generation_prompt=False,
add_generation_prompt=ctx.request.add_generation_prompt,
continue_final_message=False,
add_special_tokens=ctx.request.add_special_tokens,
)