|
@@ -255,8 +255,17 @@ def gpt():
|
|
|
print(json_response_dict)
|
|
|
if json_response_dict is not None:
|
|
|
if isinstance(json_response_dict, dict):
|
|
|
- first_key = next(iter(json_response_dict))
|
|
|
- json_response_dict = json_response_dict[first_key]
|
|
|
+ if len(json_response_dict) > 1:
|
|
|
+ qs = []
|
|
|
+ for q in json_response_dict.values():
|
|
|
+ qs.append(q)
|
|
|
+ json_response_dict = qs
|
|
|
+ else:
|
|
|
+ try:
|
|
|
+ first_key = next(iter(json_response_dict))
|
|
|
+ json_response_dict = json_response_dict[first_key]
|
|
|
+ except StopIteration:
|
|
|
+ json_response_dict = []
|
|
|
elif isinstance(json_response_dict, str):
|
|
|
json_response_dict = [json_response_dict]
|
|
|
result["predict_q"] = json_response_dict
|