q_a优化,提示词优化
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import logging
|
||||
from typing import Optional
|
||||
|
||||
from orjson import orjson
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
keywords = {
|
||||
# "gender":{"1":"男","2":"女"},
|
||||
"person_status":{"1":"草稿","2":"审批中","3":"制卡中","4":"已入库","5":"停用"},
|
||||
@@ -43,7 +44,8 @@ def extract_nested_json(text):
|
||||
stack = []
|
||||
start_index = -1
|
||||
results = []
|
||||
|
||||
if not text:
|
||||
logger.warning("extract_nested_json: text is empty")
|
||||
for i, char in enumerate(text):
|
||||
if char in '{[':
|
||||
if not stack: # 记录起始位置
|
||||
|
||||
Reference in New Issue
Block a user