Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Jul 10, 2024
1 parent 53e8b38 commit d9de02e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Argcfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,12 @@ test@tool() {
declarations_file="$TMP_DIR/functions.json"
argc list@tool > "$names_file"
argc build@tool --names-file "$names_file" --declarations-file "$declarations_file"
test-execute-code-tools
test-demo@tool
}

# @cmd Test maybe_execute_* tools
# @alias tool:test-execute-code
test-execute-code-tools() {
# @alias tool:test-execute
test-execute@tool() {
if _is_win; then
ext=".cmd"
fi
Expand Down
4 changes: 2 additions & 2 deletions scripts/run-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ async function run(agentPath, agentFunc, agentData) {
throw new Error(`Not module function '${agentFunc}' at '${agentPath}'`);
}
const value = await mod[agentFunc](agentData);
returnValue(value);
returnToLLM(value);
}

function returnValue(value) {
function returnToLLM(value) {
if (value === null || value === undefined) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/run-agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ def run(agent_path, agent_func, agent_data):
raise Exception(f"Not module function '{agent_func}' at '{agent_path}'")

value = getattr(mod, agent_func)(**agent_data)
return_value(value)
return_to_llm(value)


def return_value(value):
def return_to_llm(value):
if value is None:
return

Expand Down
4 changes: 2 additions & 2 deletions scripts/run-tool.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ async function run(toolPath, toolFunc, toolData) {
throw new Error(`Not module function '${toolFunc}' at '${toolPath}'`);
}
const value = await mod[toolFunc](toolData);
returnValue(value);
returnToLLM(value);
}

function returnValue(value) {
function returnToLLM(value) {
if (value === null || value === undefined) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/run-tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ def run(tool_path, tool_func, tool_data):
raise Exception(f"Not module function '{tool_func}' at '{tool_path}'")

value = getattr(mod, tool_func)(**tool_data)
return_value(value)
return_to_llm(value)


def return_value(value):
def return_to_llm(value):
if value is None:
return

Expand Down

0 comments on commit d9de02e

Please sign in to comment.