Skip to content

Commit

Permalink
chore: Roll back json parsing code
Browse files Browse the repository at this point in the history
  • Loading branch information
fangyinc committed Sep 28, 2023
1 parent a2108e5 commit 1c09253
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 1c09253

Please sign in to comment.