pycoze 0.1.237__py3-none-any.whl → 0.1.238__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pycoze/bot/agent/agent_types/openai_func_call_agent.py +32 -32
- {pycoze-0.1.237.dist-info → pycoze-0.1.238.dist-info}/METADATA +1 -1
- {pycoze-0.1.237.dist-info → pycoze-0.1.238.dist-info}/RECORD +6 -6
- {pycoze-0.1.237.dist-info → pycoze-0.1.238.dist-info}/LICENSE +0 -0
- {pycoze-0.1.237.dist-info → pycoze-0.1.238.dist-info}/WHEEL +0 -0
- {pycoze-0.1.237.dist-info → pycoze-0.1.238.dist-info}/top_level.txt +0 -0
@@ -35,38 +35,38 @@ def get_tools(last_message):
|
|
35
35
|
return last_message.additional_kwargs["tool_calls"]
|
36
36
|
else:
|
37
37
|
tool_calls = None
|
38
|
-
if '"name"' in last_message.content and '"parameters":' in last_message.content:
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
if "<|tool▁sep|>" in last_message.content:
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
38
|
+
# if '"name"' in last_message.content and '"parameters":' in last_message.content:
|
39
|
+
# print("name 和 paremeters 模式")
|
40
|
+
# all_json = get_all_markdown_json(last_message.content)
|
41
|
+
# tool_calls = []
|
42
|
+
# for tool_call in all_json:
|
43
|
+
# if "name" not in tool_call or "parameters" not in tool_call:
|
44
|
+
# return "end"
|
45
|
+
# tool_call["arguments"] = json.dumps(tool_call["parameters"])
|
46
|
+
# tool_call.pop("parameters")
|
47
|
+
# tool_calls.append(
|
48
|
+
# {
|
49
|
+
# "function": tool_call,
|
50
|
+
# "id": random.randint(0, 1000000),
|
51
|
+
# }
|
52
|
+
# )
|
53
|
+
# if "<|tool▁sep|>" in last_message.content:
|
54
|
+
# print("deepseek的bug: <|tool▁sep|> 模式")
|
55
|
+
# name = (
|
56
|
+
# last_message.content.split("<|tool▁sep|>")[1].split("```")[0].strip()
|
57
|
+
# )
|
58
|
+
# all_json = get_all_markdown_json(last_message.content)
|
59
|
+
# tool_calls = []
|
60
|
+
# for argument in all_json:
|
61
|
+
# tool_calls.append(
|
62
|
+
# {
|
63
|
+
# "function": {
|
64
|
+
# "name": name,
|
65
|
+
# "arguments": json.dumps(argument),
|
66
|
+
# },
|
67
|
+
# "id": random.randint(0, 1000000),
|
68
|
+
# }
|
69
|
+
# )
|
70
70
|
|
71
71
|
return tool_calls
|
72
72
|
|
@@ -17,7 +17,7 @@ pycoze/bot/agent/assistant.py,sha256=s1y_gR_9UK_jzjX6YztXK5JNhnV-_YvUA6vv1lToS-k
|
|
17
17
|
pycoze/bot/agent/chat.py,sha256=mubOCAHvA6VtyE6N40elI6KrP6A69uB_G6ihE3G_Vi4,860
|
18
18
|
pycoze/bot/agent/agent_types/__init__.py,sha256=zmU2Kmrv5mCdfg-QlPn2H6pWxbGeq8s7YTqLhpzJC6k,179
|
19
19
|
pycoze/bot/agent/agent_types/const.py,sha256=BfUKPrhAHREoMLHuFNG2bCIEkC1-f7K0LEqNg4RwiRE,70
|
20
|
-
pycoze/bot/agent/agent_types/openai_func_call_agent.py,sha256=
|
20
|
+
pycoze/bot/agent/agent_types/openai_func_call_agent.py,sha256=S61rQoQliW7I54ouwnEw_xBHEsVrnd06NP6ZXqBvGHc,6481
|
21
21
|
pycoze/reference/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
pycoze/reference/bot.py,sha256=BDflTV3zYoZqWnJpD5lMM_1vU_5b20M3XiFt1p-RHWM,2427
|
23
23
|
pycoze/reference/lib.py,sha256=0xQJTLTHedGzQBsjuTFNBVqYc4-8Yl65gGCrAhWyOX8,2155
|
@@ -32,8 +32,8 @@ pycoze/utils/__init__.py,sha256=Gi5EnrWZGMD2JRejgV4c_VLCXyvA2wwBFI_niDF5MUE,110
|
|
32
32
|
pycoze/utils/arg.py,sha256=GtfGbMTMdaK75Fwh6MpUe1pCA5X6Ep4LFG7a72YrzjI,525
|
33
33
|
pycoze/utils/env.py,sha256=W04lhvTHhAAC6EldP6kk2xrctqtu8K6kl1vDLZDNeh8,561
|
34
34
|
pycoze/utils/text_or_file.py,sha256=gpxZVWt2DW6YiEg_MnMuwg36VNf3TX383QD_1oZNB0Y,551
|
35
|
-
pycoze-0.1.
|
36
|
-
pycoze-0.1.
|
37
|
-
pycoze-0.1.
|
38
|
-
pycoze-0.1.
|
39
|
-
pycoze-0.1.
|
35
|
+
pycoze-0.1.238.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
|
36
|
+
pycoze-0.1.238.dist-info/METADATA,sha256=J_iEhDaeh0SsfdMH0fBLNYCmjBRh6USXxHc4zywm9dk,699
|
37
|
+
pycoze-0.1.238.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
38
|
+
pycoze-0.1.238.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
|
39
|
+
pycoze-0.1.238.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|