Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions genie-tool/genie_tool/tool/table_rag/table_column_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import textwrap
import time
import traceback
import json_repair

from calendar import day_name
from datetime import date
Expand Down Expand Up @@ -231,8 +232,8 @@ async def _filter_single_table(self, semaphore, table_schema_info: dict) -> dict
top_p=0.95,
only_content=True):
llm_response += chunk
result_dict = json.loads(self._parse_json_result(llm_response))

# result_dict = json.loads(self._parse_json_result(llm_response))
result_dict = json_repair.loads(llm_response)
if str(result_dict["relatedFlag"]).lower() == "true":
columns = table_schema_info.get("schemaList", [])
# column_map = {column["columnId"]: column for column in columns}
Expand Down
1 change: 1 addition & 0 deletions genie-tool/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ dependencies = [
"statsmodels>=0.14.5",
"tabulate>=0.9.0",
"uvicorn>=0.35.0",
"json_repair>=0.54.0"
]