fix: auto-fix code issues (cron)

- 修复PEP8格式问题(行长度超过120字符)
- 修复类型注解(添加__init__和_get_db返回类型)
- 删除__pycache__缓存文件
- 优化长SQL查询语句格式
This commit is contained in:
OpenClaw Bot
2026-02-28 12:12:22 +08:00
parent 6ff46cceb7
commit bfeaf4165e
48 changed files with 63 additions and 29 deletions

View File

@@ -119,18 +119,23 @@ class LLMClient:
文本:{text[:3000]}
要求:
1. entities: 每个实体包含 name(名称), type(类型: PROJECT/TECH/PERSON/ORG/OTHER), definition(一句话定义), confidence(置信度0-1)
2. relations: 每个关系包含 source(源实体名), target(目标实体名), type(关系类型: belongs_to/works_with/depends_on/mentions/related), confidence(置信度0-1)
1. entities: 每个实体包含 name(名称), type(类型: PROJECT/TECH/PERSON/ORG/OTHER),
definition(一句话定义), confidence(置信度0-1)
2. relations: 每个关系包含 source(源实体名), target(目标实体名),
type(关系类型: belongs_to/works_with/depends_on/mentions/related), confidence(置信度0-1)
3. 只返回 JSON 对象,格式: {{"entities": [...], "relations": [...]}}
示例:
{{
"entities": [
{{"name": "Project Alpha", "type": "PROJECT", "definition": "核心项目", "confidence": 0.95}},
{{"name": "K8s", "type": "TECH", "definition": "Kubernetes容器编排平台", "confidence": 0.88}}
{{"name": "Project Alpha", "type": "PROJECT", "definition": "核心项目",
"confidence": 0.95}},
{{"name": "K8s", "type": "TECH", "definition": "Kubernetes容器编排平台",
"confidence": 0.88}}
],
"relations": [
{{"source": "Project Alpha", "target": "K8s", "type": "depends_on", "confidence": 0.82}}
{{"source": "Project Alpha", "target": "K8s", "type": "depends_on",
"confidence": 0.82}}
]
}}"""