Support Xinference (#320)

### What problem does this PR solve?

Issue link:#299

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
KevinHuSh
2024-04-11 18:22:25 +08:00
committed by GitHub
parent cb2cbf500c
commit 91068edf16
14 changed files with 81 additions and 7 deletions

View File

@ -360,6 +360,7 @@ def use_sql(question, field_map, tenant_id, chat_mdl):
"|" for r in tbl["rows"]]
rows = "\n".join([r + f" ##{ii}$$ |" for ii, r in enumerate(rows)])
rows = re.sub(r"T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+Z)?\|", "|", rows)
if not docid_idx or not docnm_idx:
chat_logger.warning("SQL missing field: " + sql)
return {