mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix: typo. (#10011)
### What problem does this PR solve? ### Type of change - [x] Refactoring
This commit is contained in:
@ -5,7 +5,7 @@ Your job is:
|
|||||||
3. Use `complete_task` if no further step you need to take from tools. (All necessary steps done or little hope to be done)
|
3. Use `complete_task` if no further step you need to take from tools. (All necessary steps done or little hope to be done)
|
||||||
|
|
||||||
# ========== TASK ANALYSIS =============
|
# ========== TASK ANALYSIS =============
|
||||||
{{ task_analisys }}
|
{{ task_analysis }}
|
||||||
|
|
||||||
# ========== TOOLS (JSON-Schema) ==========
|
# ========== TOOLS (JSON-Schema) ==========
|
||||||
You may invoke only the tools listed below.
|
You may invoke only the tools listed below.
|
||||||
|
|||||||
@ -368,7 +368,7 @@ def next_step(chat_mdl, history:list, tools_description: list[dict], task_desc,
|
|||||||
hist[-1]["content"] += user_prompt
|
hist[-1]["content"] += user_prompt
|
||||||
else:
|
else:
|
||||||
hist.append({"role": "user", "content": user_prompt})
|
hist.append({"role": "user", "content": user_prompt})
|
||||||
json_str = chat_mdl.chat(template.render(task_analisys=task_desc, desc=desc, today=datetime.datetime.now().strftime("%Y-%m-%d")),
|
json_str = chat_mdl.chat(template.render(task_analysis=task_desc, desc=desc, today=datetime.datetime.now().strftime("%Y-%m-%d")),
|
||||||
hist[1:], stop=["<|stop|>"])
|
hist[1:], stop=["<|stop|>"])
|
||||||
tk_cnt = num_tokens_from_string(json_str)
|
tk_cnt = num_tokens_from_string(json_str)
|
||||||
json_str = re.sub(r"^.*</think>", "", json_str, flags=re.DOTALL)
|
json_str = re.sub(r"^.*</think>", "", json_str, flags=re.DOTALL)
|
||||||
|
|||||||
Reference in New Issue
Block a user