pycoze 0.1.47__tar.gz → 0.1.49__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pycoze-0.1.47 → pycoze-0.1.49}/PKG-INFO +1 -1
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/bot/agent/agent_types/openai_func_call_agent.py +15 -15
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/bot/bot.py +1 -1
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze.egg-info/PKG-INFO +1 -1
- {pycoze-0.1.47 → pycoze-0.1.49}/setup.py +1 -1
- {pycoze-0.1.47 → pycoze-0.1.49}/LICENSE +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/README.md +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/__init__.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/access/__init__.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/access/tool_for_bot.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/bot/__init__.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/bot/agent/__init__.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/bot/agent/agent.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/bot/agent/agent_types/__init__.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/bot/agent/agent_types/react_agent.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/bot/agent/agent_types/react_prompt.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/bot/agent/assistant.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/bot/agent/chat.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/gpu/__init__.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/gpu/gpu_reserve.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/module.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/ui/__init__.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/ui/base.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/ui/color.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/ui/typ.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/ui/ui_def.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/utils/__init__.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/utils/arg.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze/utils/text_or_file.py +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze.egg-info/SOURCES.txt +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze.egg-info/dependency_links.txt +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/pycoze.egg-info/top_level.txt +0 -0
- {pycoze-0.1.47 → pycoze-0.1.49}/setup.cfg +0 -0
@@ -60,21 +60,21 @@ def create_openai_func_call_agent_executor(
|
|
60
60
|
last_message = messages[-1]
|
61
61
|
if last_message.content.strip().endswith("```"):
|
62
62
|
last_message.content = last_message.content + "\n\n" # 避免影响阅读
|
63
|
-
|
64
|
-
if (
|
65
|
-
|
66
|
-
|
67
|
-
):
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
63
|
+
# if not last_message.tool_calls:
|
64
|
+
# if (
|
65
|
+
# "接下来我将" in last_message.content
|
66
|
+
# or "接下来,我将" in last_message.content
|
67
|
+
# ):
|
68
|
+
# print("deepseek的bug: “接下来我将” 模式,使用a_delay_function骗过llm")
|
69
|
+
# last_message.additional_kwargs["tool_calls"] = (
|
70
|
+
# last_message.tool_calls
|
71
|
+
# ) = [
|
72
|
+
# {
|
73
|
+
# "function": {"name": "a_delay_function", "arguments": "{}"},
|
74
|
+
# "id": random.randint(0, 1000000),
|
75
|
+
# }
|
76
|
+
# ]
|
77
|
+
# return "continue"
|
78
78
|
if (
|
79
79
|
'"name"' in last_message.content
|
80
80
|
and '"parameters":' in last_message.content
|
@@ -47,7 +47,7 @@ def agent_chat(bot_setting_file, history):
|
|
47
47
|
prompt = role_setting["prompt"]
|
48
48
|
if cfg["model"].startswith("deepseek") and len(tools) > 0:
|
49
49
|
prompt += """
|
50
|
-
|
50
|
+
如果需要调用工具,请使用以正确的json格式进行结尾(务必保证json格式正确):
|
51
51
|
```json
|
52
52
|
{"name": 函数名, "parameters": 参数词典}
|
53
53
|
```
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|