Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit d168241

Browse files
Fix code genenration code format issue (#1424)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
1 parent d21bb3e commit d168241

File tree

1 file changed

+1
-1
lines changed
  • intel_extension_for_transformers/neural_chat/server/restful

1 file changed

+1
-1
lines changed

intel_extension_for_transformers/neural_chat/server/restful/codegen_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def handle_chat_completion_request(self, request: ChatCompletionRequest):
100100
def stream_generator():
101101
nonlocal buffered_texts
102102
for output in generator:
103-
yield f"data: {output}\n\n"
103+
yield f"data: {output.encode()}\n\n"
104104
yield f"data: [DONE]\n\n"
105105
if is_plugin_enabled("cache") and \
106106
not plugins["cache"]["instance"].pre_llm_inference_actions(request.prompt):

0 commit comments

Comments
 (0)