diff --git a/docs/swarms/structs/multi_swarm_orchestration.md b/docs/swarms/structs/multi_swarm_orchestration.md index f0a0df21..68f36a4e 100644 --- a/docs/swarms/structs/multi_swarm_orchestration.md +++ b/docs/swarms/structs/multi_swarm_orchestration.md @@ -116,37 +116,55 @@ flowchart TD ## Use Case Recommendations -1. **HHCS**: Best for: - - Enterprise-scale operations - - Multi-domain problems - - Complex task routing - - Parallel processing needs - -2. **Auto Agent Builder**: Best for: - - Dynamic workloads - - Evolving requirements - - Research and development - - Exploratory tasks - -3. **SwarmRouter**: Best for: - - General purpose tasks - - Quick deployment - - Mixed workflow types - - Smaller scale operations +### **HHCS**: Best for: + +- Enterprise-scale operations + +- Multi-domain problems + +- Complex task routing + +- Parallel processing needs + +### **Auto Agent Builder**: Best for: + +- Dynamic workloads + +- Evolving requirements + +- Research and development + +- Exploratory tasks + +### **SwarmRouter**: Best for: + +- General purpose tasks + +- Quick deployment + +- Mixed workflow types + +- Smaller scale operations ## Documentation Links -1. HHCS Documentation: - - [Hybrid Hierarchical-Cluster Swarm Documentation](https://docs.swarms.world/en/latest/swarms/structs/hhcs/) - - Covers detailed implementation, constructor arguments, and full examples +### HHCS Documentation: + +- [Hybrid Hierarchical-Cluster Swarm Documentation](https://docs.swarms.world/en/latest/swarms/structs/hhcs/) -2. Auto Agent Builder Documentation: - - [Agent Builder Documentation](https://docs.swarms.world/en/latest/swarms/structs/auto_agent_builder/) - - Includes enterprise use cases, best practices, and integration patterns +- Covers detailed implementation, constructor arguments, and full examples + +### Auto Agent Builder Documentation: + +- [Agent Builder Documentation](https://docs.swarms.world/en/latest/swarms/structs/auto_agent_builder/) + +- Includes enterprise use cases, best practices, and integration patterns 3. SwarmRouter Documentation: - - [SwarmRouter Documentation](https://docs.swarms.world/en/latest/swarms/structs/swarm_router/) - - Provides comprehensive API reference, advanced usage, and use cases + +- [SwarmRouter Documentation](https://docs.swarms.world/en/latest/swarms/structs/swarm_router/) + +- Provides comprehensive API reference, advanced usage, and use cases ## Best Practices for Selection diff --git a/swarms/tools/tool_schema_base_model.py b/swarms/tools/tool_schema_base_model.py new file mode 100644 index 00000000..20e4845d --- /dev/null +++ b/swarms/tools/tool_schema_base_model.py @@ -0,0 +1,57 @@ +from typing import Any, Dict, List, Optional +from pydantic import BaseModel + + +class PropertySchema(BaseModel): + type: str + description: Optional[str] = None + enum: Optional[List[str]] = None + items: Optional[Dict[str, Any]] = None + properties: Optional[Dict[str, "PropertySchema"]] = None + required: Optional[List[str]] = None + + +class ParameterSchema(BaseModel): + type: str + properties: Dict[str, PropertySchema] + required: Optional[List[str]] = None + + +class FunctionDefinition(BaseModel): + name: str + description: str + parameters: ParameterSchema + + +class Tool(BaseModel): + type: str + function: FunctionDefinition + + +class ToolSet(BaseModel): + tools: List[Tool] + + +model = ToolSet( + tools=[ + Tool( + type="function", + function=FunctionDefinition( + name="test", + description="test", + parameters=ParameterSchema( + type="object", + properties={ + "weather_tool": PropertySchema( + type="string", + description="Get the weather in a given location", + ) + }, + required=["weather_tool"], + ), + ), + ), + ] +) + +print(model.model_dump_json(indent=4))