diff --git a/src/lib.rs b/src/lib.rs index 8da3803..2d0900b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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, diff --git a/tests/run.rs b/tests/run.rs index 8df2c5a..630bd61 100644 --- a/tests/run.rs +++ b/tests/run.rs @@ -281,4 +281,10 @@ mod openrouter_tests { Model::ORNousHermes405B, QUESTIONS_WORKFLOW_PATH ); + + workflow_test!( + qwen_coder_custom_tool_openrouter, + Model::ORQwen2_5Coder32B, + CODER_PATH + ); } diff --git a/tests/test_workflows/search.json b/tests/test_workflows/search.json index 184be5f..caebf56 100644 --- a/tests/test_workflows/search.json +++ b/tests/test_workflows/search.json @@ -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 + } } \ No newline at end of file