Skip to content

Commit

Permalink
chore: Roll back json parsing code (#637)
Browse files Browse the repository at this point in the history
See
[here](#626 (comment))
  • Loading branch information
Aries-ckt authored Sep 28, 2023
2 parents a2108e5 + 1c09253 commit 48aa8b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pilot/scene/chat_dashboard/out_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def __init__(self, sep: str, is_stream_out: bool):
super().__init__(sep=sep, is_stream_out=is_stream_out)

def parse_prompt_response(self, model_out_text):
# clean_str = super().parse_prompt_response(model_out_text)
print("clean prompt response:", model_out_text)
response = json.loads(model_out_text)
clean_str = super().parse_prompt_response(model_out_text)
print("clean prompt response:", clean_str)
response = json.loads(clean_str)
chart_items: List[ChartItem] = []
if not isinstance(response, list):
response = [response]
Expand Down

0 comments on commit 48aa8b8

Please sign in to comment.