Skip to content

Commit ea4acb8

Browse files
committed
update
1 parent ecba0db commit ea4acb8

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

β€Žwren-ai-service/src/web/v2/services/conversation.py

+6-12
Original file line numberDiff line numberDiff line change
@@ -517,17 +517,11 @@ async def _run_sql_executor(
517517

518518
return sql_data
519519

520-
async def _run_preview_data(
520+
async def _run_DATA_PREVIEW(
521521
self,
522522
data: Dict,
523523
):
524-
return [
525-
{
526-
"data": data,
527-
}
528-
], {
529-
"data": data,
530-
}
524+
return [data], data
531525

532526
def _run_sql_answer(
533527
self,
@@ -793,7 +787,7 @@ async def start_conversation(
793787
query_id,
794788
trace_id,
795789
index=index,
796-
emit_content_func=self._run_preview_data,
790+
emit_content_func=self._run_DATA_PREVIEW,
797791
emit_content_func_kwargs={
798792
"data": {
799793
"type": "CHART",
@@ -803,7 +797,7 @@ async def start_conversation(
803797
},
804798
},
805799
},
806-
content_block_label="PREVIEW_DATA",
800+
content_block_label="DATA_PREVIEW",
807801
block_type="tool_use",
808802
)
809803
else: # TEXT_TO_SQL
@@ -1001,7 +995,7 @@ async def start_conversation(
1001995
query_id,
1002996
trace_id,
1003997
index=index,
1004-
emit_content_func=self._run_preview_data,
998+
emit_content_func=self._run_DATA_PREVIEW,
1005999
emit_content_func_kwargs={
10061000
"data": {
10071001
"type": "TABLE",
@@ -1010,7 +1004,7 @@ async def start_conversation(
10101004
},
10111005
},
10121006
},
1013-
content_block_label="PREVIEW_DATA",
1007+
content_block_label="DATA_PREVIEW",
10141008
block_type="tool_use",
10151009
)
10161010

0 commit comments

Comments
Β (0)