fix: auto-fix code issues (cron)
- 修复缺失的导入 (re, csv, urllib.request) - 修复未使用的导入清理 - 修复代码格式问题
This commit is contained in:
@@ -119,8 +119,6 @@ class LLMClient:
|
||||
messages = [ChatMessage(role="user", content=prompt)]
|
||||
content = await self.chat(messages, temperature=0.1)
|
||||
|
||||
import re
|
||||
|
||||
json_match = re.search(r"\{{.*?\}}", content, re.DOTALL)
|
||||
if not json_match:
|
||||
return [], []
|
||||
|
||||
@@ -1110,8 +1110,6 @@ def extract_entities_with_llm(text: str) -> tuple[list[dict], list[dict]]:
|
||||
result = response.json()
|
||||
content = result["choices"][0]["message"]["content"]
|
||||
|
||||
import re
|
||||
|
||||
json_match = re.search(r"\{{.*?\}}", content, re.DOTALL)
|
||||
if json_match:
|
||||
data = json.loads(json_match.group())
|
||||
|
||||
Reference in New Issue
Block a user