praisonaiagents 0.0.70__py3-none-any.whl → 0.0.72__py3-none-any.whl
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.
- praisonaiagents/llm/llm.py +20 -4
- {praisonaiagents-0.0.70.dist-info → praisonaiagents-0.0.72.dist-info}/METADATA +5 -2
- {praisonaiagents-0.0.70.dist-info → praisonaiagents-0.0.72.dist-info}/RECORD +5 -5
- {praisonaiagents-0.0.70.dist-info → praisonaiagents-0.0.72.dist-info}/WHEEL +0 -0
- {praisonaiagents-0.0.70.dist-info → praisonaiagents-0.0.72.dist-info}/top_level.txt +0 -0
praisonaiagents/llm/llm.py
CHANGED
@@ -520,8 +520,16 @@ class LLM:
|
|
520
520
|
if ('name' in json_response or 'function' in json_response) and not any(word in response_text.lower() for word in ['summary', 'option', 'result', 'found']):
|
521
521
|
logging.debug("Detected Ollama returning only tool call JSON, making follow-up call to process results")
|
522
522
|
|
523
|
-
# Create a prompt that asks the model to process the tool results
|
524
|
-
|
523
|
+
# Create a prompt that asks the model to process the tool results based on original context
|
524
|
+
# Extract the original user query from messages
|
525
|
+
original_query = ""
|
526
|
+
for msg in messages:
|
527
|
+
if msg.get("role") == "user":
|
528
|
+
original_query = msg.get("content", "")
|
529
|
+
break
|
530
|
+
|
531
|
+
# Create a shorter follow-up prompt
|
532
|
+
follow_up_prompt = f"Results:\n{json.dumps(tool_result, indent=2)}\nProvide Answer to this Original Question based on the above results: '{original_query}'"
|
525
533
|
|
526
534
|
# Make a follow-up call to process the results
|
527
535
|
follow_up_messages = [
|
@@ -1091,8 +1099,16 @@ Output MUST be JSON with 'reflection' and 'satisfactory'.
|
|
1091
1099
|
if ('name' in json_response or 'function' in json_response) and not any(word in response_text.lower() for word in ['summary', 'option', 'result', 'found']):
|
1092
1100
|
logging.debug("Detected Ollama returning only tool call JSON in async mode, making follow-up call to process results")
|
1093
1101
|
|
1094
|
-
# Create a prompt that asks the model to process the tool results
|
1095
|
-
|
1102
|
+
# Create a prompt that asks the model to process the tool results based on original context
|
1103
|
+
# Extract the original user query from messages
|
1104
|
+
original_query = ""
|
1105
|
+
for msg in messages:
|
1106
|
+
if msg.get("role") == "user":
|
1107
|
+
original_query = msg.get("content", "")
|
1108
|
+
break
|
1109
|
+
|
1110
|
+
# Create a shorter follow-up prompt
|
1111
|
+
follow_up_prompt = f"Results:\n{json.dumps(tool_result, indent=2)}\nProvide Answer to this Original Question based on the above results: '{original_query}'"
|
1096
1112
|
|
1097
1113
|
# Make a follow-up call to process the results
|
1098
1114
|
follow_up_messages = [
|
@@ -1,12 +1,14 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: praisonaiagents
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.72
|
4
4
|
Summary: Praison AI agents for completing complex tasks with Self Reflection Agents
|
5
5
|
Author: Mervin Praison
|
6
6
|
Requires-Dist: pydantic
|
7
7
|
Requires-Dist: rich
|
8
8
|
Requires-Dist: openai
|
9
|
-
Requires-Dist: mcp
|
9
|
+
Requires-Dist: mcp>=1.6.0
|
10
|
+
Provides-Extra: mcp
|
11
|
+
Requires-Dist: mcp>=1.6.0; extra == "mcp"
|
10
12
|
Provides-Extra: memory
|
11
13
|
Requires-Dist: chromadb>=0.5.23; extra == "memory"
|
12
14
|
Provides-Extra: knowledge
|
@@ -21,3 +23,4 @@ Provides-Extra: all
|
|
21
23
|
Requires-Dist: praisonaiagents[memory]; extra == "all"
|
22
24
|
Requires-Dist: praisonaiagents[knowledge]; extra == "all"
|
23
25
|
Requires-Dist: praisonaiagents[llm]; extra == "all"
|
26
|
+
Requires-Dist: praisonaiagents[mcp]; extra == "all"
|
@@ -10,7 +10,7 @@ praisonaiagents/knowledge/__init__.py,sha256=xL1Eh-a3xsHyIcU4foOWF-JdWYIYBALJH9b
|
|
10
10
|
praisonaiagents/knowledge/chunking.py,sha256=FzoNY0q8MkvG4gADqk4JcRhmH3lcEHbRdonDgitQa30,6624
|
11
11
|
praisonaiagents/knowledge/knowledge.py,sha256=fQNREDiwdoisfIxJBLVkteXgq_8Gbypfc3UaZbxf5QY,13210
|
12
12
|
praisonaiagents/llm/__init__.py,sha256=ttPQQJQq6Tah-0updoEXDZFKWtJAM93rBWRoIgxRWO8,689
|
13
|
-
praisonaiagents/llm/llm.py,sha256=
|
13
|
+
praisonaiagents/llm/llm.py,sha256=1WjHumxzuc8sj81NQ4uVEIetUOrb-i58HYLQW7vjV3M,87921
|
14
14
|
praisonaiagents/mcp/__init__.py,sha256=IkYdrAK1bDQDm_0t3Wjt63Zwv3_IJgqz84Wqz9GH2iQ,111
|
15
15
|
praisonaiagents/mcp/mcp.py,sha256=BPPf5AIPXx28PaJJqOg6T3NRyymQH9YAD-Km7Ma9-KA,13681
|
16
16
|
praisonaiagents/memory/memory.py,sha256=I8dOTkrl1i-GgQbDcrFOsSruzJ7MiI6Ys37DK27wrUs,35537
|
@@ -39,7 +39,7 @@ praisonaiagents/tools/xml_tools.py,sha256=iYTMBEk5l3L3ryQ1fkUnNVYK-Nnua2Kx2S0dxN
|
|
39
39
|
praisonaiagents/tools/yaml_tools.py,sha256=uogAZrhXV9O7xvspAtcTfpKSQYL2nlOTvCQXN94-G9A,14215
|
40
40
|
praisonaiagents/tools/yfinance_tools.py,sha256=s2PBj_1v7oQnOobo2fDbQBACEHl61ftG4beG6Z979ZE,8529
|
41
41
|
praisonaiagents/tools/train/data/generatecot.py,sha256=H6bNh-E2hqL5MW6kX3hqZ05g9ETKN2-kudSjiuU_SD8,19403
|
42
|
-
praisonaiagents-0.0.
|
43
|
-
praisonaiagents-0.0.
|
44
|
-
praisonaiagents-0.0.
|
45
|
-
praisonaiagents-0.0.
|
42
|
+
praisonaiagents-0.0.72.dist-info/METADATA,sha256=EtldO2ogRkzoMVJPRQKRWbEcvzwl9wnwL3hP0qYMFK8,970
|
43
|
+
praisonaiagents-0.0.72.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
44
|
+
praisonaiagents-0.0.72.dist-info/top_level.txt,sha256=_HsRddrJ23iDx5TTqVUVvXG2HeHBL5voshncAMDGjtA,16
|
45
|
+
praisonaiagents-0.0.72.dist-info/RECORD,,
|
File without changes
|
File without changes
|