mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-03 09:34:04 +00:00
feat(agent): Add count field and support non-ASCII characters in DataScientist action output (#2812)
Co-authored-by: tanwei <tanwei@fulan.com.cn>
This commit is contained in:
parent
bcb4eb3983
commit
fd6572322c
@ -87,10 +87,18 @@ class ChartAction(Action[SqlInput]):
|
|||||||
|
|
||||||
param_dict = model_to_dict(param)
|
param_dict = model_to_dict(param)
|
||||||
if not data_df.empty:
|
if not data_df.empty:
|
||||||
|
param_dict["count"] = len(data_df)
|
||||||
|
|
||||||
param_dict["data"] = json.loads(
|
param_dict["data"] = json.loads(
|
||||||
data_df.to_json(orient="records", date_format="iso", date_unit="s")
|
data_df.to_json(
|
||||||
|
orient="records",
|
||||||
|
force_ascii=False,
|
||||||
|
date_format="iso",
|
||||||
|
date_unit="s",
|
||||||
)
|
)
|
||||||
content = json.dumps(param_dict)
|
)
|
||||||
|
|
||||||
|
content = json.dumps(param_dict, ensure_ascii=False)
|
||||||
|
|
||||||
return ActionOutput(
|
return ActionOutput(
|
||||||
is_exe_success=True,
|
is_exe_success=True,
|
||||||
|
Loading…
Reference in New Issue
Block a user