Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#1: Returning Output Directly
Signed-off-by: Deepanshu Arora <[email protected]>
  • Loading branch information
Deepansharora27 committed Aug 1, 2023
commit 3afe2d632e5fb829b2c98cff7c9719db012e7000
11 changes: 9 additions & 2 deletions fastchat/serve/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,15 @@ def stream_output(self, output_stream):
if now > pre:
print(" ".join(output_text[pre:now]), end=" ", flush=True)
pre = now
print(" ".join(output_text[pre:]), flush=True)
return " ".join(output_text)
# print(" ".join(output_text[pre:]), flush=True)
# return " ".join(output_text)
relevant_output.append(" ".join(output_text[pre:]))
self._stored_output = " ".join(output_text) # Store the entire output in the variable

return self._stored_output

def get_relevant_output(self) -> str:
return self._stored_output


class RichChatIO(ChatIO):
Expand Down