File tree 1 file changed +6
-12
lines changed
wren-ai-service/src/web/v2/services
1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -517,17 +517,11 @@ async def _run_sql_executor(
517
517
518
518
return sql_data
519
519
520
- async def _run_preview_data (
520
+ async def _run_DATA_PREVIEW (
521
521
self ,
522
522
data : Dict ,
523
523
):
524
- return [
525
- {
526
- "data" : data ,
527
- }
528
- ], {
529
- "data" : data ,
530
- }
524
+ return [data ], data
531
525
532
526
def _run_sql_answer (
533
527
self ,
@@ -793,7 +787,7 @@ async def start_conversation(
793
787
query_id ,
794
788
trace_id ,
795
789
index = index ,
796
- emit_content_func = self ._run_preview_data ,
790
+ emit_content_func = self ._run_DATA_PREVIEW ,
797
791
emit_content_func_kwargs = {
798
792
"data" : {
799
793
"type" : "CHART" ,
@@ -803,7 +797,7 @@ async def start_conversation(
803
797
},
804
798
},
805
799
},
806
- content_block_label = "PREVIEW_DATA " ,
800
+ content_block_label = "DATA_PREVIEW " ,
807
801
block_type = "tool_use" ,
808
802
)
809
803
else : # TEXT_TO_SQL
@@ -1001,7 +995,7 @@ async def start_conversation(
1001
995
query_id ,
1002
996
trace_id ,
1003
997
index = index ,
1004
- emit_content_func = self ._run_preview_data ,
998
+ emit_content_func = self ._run_DATA_PREVIEW ,
1005
999
emit_content_func_kwargs = {
1006
1000
"data" : {
1007
1001
"type" : "TABLE" ,
@@ -1010,7 +1004,7 @@ async def start_conversation(
1010
1004
},
1011
1005
},
1012
1006
},
1013
- content_block_label = "PREVIEW_DATA " ,
1007
+ content_block_label = "DATA_PREVIEW " ,
1014
1008
block_type = "tool_use" ,
1015
1009
)
1016
1010
You canβt perform that action at this time.
0 commit comments