Skip to content

Commit

Permalink
execution error exposed
Browse files Browse the repository at this point in the history
  • Loading branch information
andthattoo committed Nov 26, 2024
1 parent 3338540 commit 3f364cd
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 48 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub use memory::types::Entry;
pub use memory::ProgramMemory;
pub use ollama_rs;
pub use program::{
errors::ExecutionError,
executor::Executor,
models::{Model, ModelProvider},
workflow::Workflow,
Expand Down
6 changes: 6 additions & 0 deletions tests/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,10 @@ mod openrouter_tests {
Model::ORNousHermes405B,
QUESTIONS_WORKFLOW_PATH
);

workflow_test!(
qwen_coder_custom_tool_openrouter,
Model::ORQwen2_5Coder32B,
CODER_PATH
);
}
108 changes: 60 additions & 48 deletions tests/test_workflows/search.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,62 @@
{
"name": "Search",
"description": "This is a search workflow",
"config":{
"max_steps": 100,
"max_time": 600,
"max_tokens":250,
"tools": ["ALL"]
},
"tasks":[
{
"id": "A",
"name": "Random Poem",
"description": "Search a poem about Kapadokya.",
"messages": [{"role":"user", "content":"{\"query\": \"Kapadokya şiirleri\", \"search_type\": \"search\", \"lang\": \"tr\", \"n_results\": 2}"}],
"inputs":[],
"operator": "search",
"outputs":[
{
"type": "write",
"key": "poem",
"value": "__result"
}
]
},
{
"id": "__end",
"name": "end",
"description": "End of the task",
"messages": [{"role": "user", "content": "End of the task"}],
"inputs": [],
"operator": "end",
"outputs": []
}
],
"steps":[
{
"source":"A",
"target":"end"
}
],
"return_value":
{
"input":[{
"type": "read",
"key": "poem"
}
]
}
"config": {
"max_steps": 50,
"max_time": 200,
"tools": [
"ALL"
],
"max_tokens": 1000
},
"external_memory": {
"query": "Most expensive cities in the world"
},
"tasks": [
{
"id": "0",
"name": "Task",
"description": "Task Description",
"messages": [
{
"role": "user",
"content": "{\"query\": \"Most expensive cities in the world\", \"search_type\": \"search\", \"lang\": \"en\", \"n_results\": 5}"
}
],
"inputs": [],
"operator": "search",
"outputs": [
{
"type": "write",
"key": "search_result",
"value": "__result"
}
]
},
{
"id": "_end",
"name": "Task",
"description": "Task Description",
"messages": [
{
"role": "user",
"content": ""
}
],
"inputs": [],
"operator": "end",
"outputs": []
}
],
"steps": [
{
"source": "0",
"target": "_end"
}
],
"return_value": {
"input": {
"type": "read",
"key": "search_result"
},
"to_json": false
}
}

0 comments on commit 3f364cd

Please sign in to comment.