agentnet 0.1.17 → 0.1.18
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.
- package/package.json +1 -1
- package/src/agent/executor.js +9 -1
- package/src/llm/gemini.js +1 -1
package/package.json
CHANGED
package/src/agent/executor.js
CHANGED
|
@@ -38,7 +38,6 @@ export function makeToolsAndHandoffsMap(llmType, toolsAndHandoffsMap, tools, han
|
|
|
38
38
|
if (!tools) {
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
41
|
try {
|
|
43
42
|
// Process tools
|
|
44
43
|
for (const tool of tools) {
|
|
@@ -46,6 +45,10 @@ export function makeToolsAndHandoffsMap(llmType, toolsAndHandoffsMap, tools, han
|
|
|
46
45
|
logger.warn('Skipping undefined tool');
|
|
47
46
|
continue;
|
|
48
47
|
}
|
|
48
|
+
if (toolsAndHandoffsMap[tool.name] !== undefined) {
|
|
49
|
+
logger.warn('Skipping duplicate tool', { tool });
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
49
52
|
|
|
50
53
|
if (!tool.schema) {
|
|
51
54
|
toolsAndHandoffsMap.tools.push(tool);
|
|
@@ -76,6 +79,11 @@ export function makeToolsAndHandoffsMap(llmType, toolsAndHandoffsMap, tools, han
|
|
|
76
79
|
if (llmType === 'openai') {
|
|
77
80
|
handoff.schema.type = 'function'
|
|
78
81
|
}
|
|
82
|
+
|
|
83
|
+
if (toolsAndHandoffsMap[handoff.name] !== undefined) {
|
|
84
|
+
logger.warn('Skipping duplicate handoff', { handoff });
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
79
87
|
|
|
80
88
|
// Add handoff schema to tools list
|
|
81
89
|
toolsAndHandoffsMap.tools.push(handoff.schema);
|
package/src/llm/gemini.js
CHANGED
|
@@ -42,7 +42,6 @@ class GeminiLLM extends BaseLLM {
|
|
|
42
42
|
*/
|
|
43
43
|
async callModel(llmClientConfig, context) {
|
|
44
44
|
const { client, toolsAndHandoffsMap, conversation } = context;
|
|
45
|
-
|
|
46
45
|
// conversation is always a Conversation object
|
|
47
46
|
const input = { ...llmClientConfig, contents: conversation.getRawConversation() };
|
|
48
47
|
|
|
@@ -61,6 +60,7 @@ class GeminiLLM extends BaseLLM {
|
|
|
61
60
|
});
|
|
62
61
|
|
|
63
62
|
try {
|
|
63
|
+
|
|
64
64
|
const res = await client.models.generateContent(input);
|
|
65
65
|
logger.debug('Gemini response', res)
|
|
66
66
|
logger.debug('Gemini response received', {
|