mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-26 08:56:22 +02:00
Add more docs and validate tool configs
This commit is contained in:
parent
ecc470d5a3
commit
6e59de77aa
7 changed files with 166 additions and 7 deletions
|
|
@ -228,6 +228,13 @@ def check_request_validity(messages, agent_configs, tool_configs, prompt_configs
|
|||
missing_keys = [key for key in ["name", "instructions", "tools", "model"] if key not in agent_config]
|
||||
error_msg = f"Invalid agent config - missing keys: {missing_keys}"
|
||||
error_type = ErrorType.FATAL.value
|
||||
|
||||
# All tool configs should have: name, parameters --> Fatal
|
||||
for tool_config in tool_configs:
|
||||
if not all(key in tool_config for key in ["name", "parameters"]):
|
||||
missing_keys = [key for key in ["name", "parameters"] if key not in tool_config]
|
||||
error_msg = f"Invalid tool config - missing keys: {missing_keys}"
|
||||
error_type = ErrorType.FATAL.value
|
||||
|
||||
# Check for cycles in the agent config graph. Raise error if cycle is found, along with the agents involved in the cycle.
|
||||
def find_cycles(agent_name, agent_configs, visited=None, path=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue