[Bug]: When apply continue_final_message for OpenAI server, the "echo":false is ignored (#10180)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
Chauncey
2024-11-22 00:24:32 +08:00
committed by GitHub
parent 4d676f0852
commit da7e702c6f
2 changed files with 81 additions and 2 deletions

View File

@@ -361,7 +361,7 @@ class OpenAIServingChat(OpenAIServing):
# Send response to echo the input portion of the
# last message
if request.echo or request.continue_final_message:
if request.echo:
last_msg_content: Union[str, List[Dict[str, str]]] = ""
if conversation and "content" in conversation[
-1] and conversation[-1].get("role") == role:
@@ -706,7 +706,7 @@ class OpenAIServingChat(OpenAIServing):
stop_reason=output.stop_reason)
choices.append(choice_data)
if request.echo or request.continue_final_message:
if request.echo:
last_msg_content: Union[str, List[Dict[str, str]]] = ""
if conversation and "content" in conversation[-1] and conversation[
-1].get("role") == role: