Fix: add auto_parse to kb detail. (#11153)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-11-11 12:22:43 +08:00
committed by GitHub
parent 83ff8e8009
commit dd5b8e2e1a
3 changed files with 33 additions and 35 deletions

View File

@ -90,7 +90,7 @@ class CommonService:
else: else:
query_records = cls.model.select() query_records = cls.model.select()
if reverse is not None: if reverse is not None:
if not order_by or not hasattr(cls, order_by): if not order_by or not hasattr(cls.model, order_by):
order_by = "create_time" order_by = "create_time"
if reverse is True: if reverse is True:
query_records = query_records.order_by(cls.model.getter_by(order_by).desc()) query_records = query_records.order_by(cls.model.getter_by(order_by).desc())

View File

@ -268,6 +268,7 @@ class Connector2KbService(CommonService):
Connector.id, Connector.id,
Connector.source, Connector.source,
Connector.name, Connector.name,
cls.model.auto_parse,
Connector.status Connector.status
] ]
return list(cls.model.select(*fields)\ return list(cls.model.select(*fields)\

View File

@ -303,9 +303,6 @@ class QWenCV(GptV4):
return call_api() return call_api()
except Exception as e2: except Exception as e2:
raise RuntimeError(f"Both default and intl endpoint failed.\nFirst error: {e1}\nSecond error: {e2}") raise RuntimeError(f"Both default and intl endpoint failed.\nFirst error: {e1}\nSecond error: {e2}")
finally:
if tmp_path and tmp_path.exists():
tmp_path.unlink()
class HunyuanCV(GptV4): class HunyuanCV(GptV4):