File size: 4,730 Bytes
20d720d
 
 
 
 
c537b15
20d720d
c537b15
 
20d720d
c537b15
 
 
 
 
 
20d720d
c537b15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20d720d
c537b15
 
 
 
 
 
20d720d
c537b15
 
 
 
20d720d
c537b15
 
20d720d
c537b15
 
 
 
 
 
 
 
 
 
 
 
 
20d720d
c537b15
 
 
20d720d
c537b15
 
 
20d720d
c537b15
 
 
 
 
 
 
 
 
 
 
 
 
20d720d
c537b15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20d720d
c537b15
 
 
 
 
 
20d720d
c537b15
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
"""
Agent Tools module for Personal Coach CrewAI Application
Contains specialized tools for each agent's functionality.
Supports modular class-based tool containers.
"""
# from typing import TYPE_CHECKING, Dict, Any

# # Version info
# __version__ = "1.0.0"

# # Lazy imports for type checking and IDE intellisense
# if TYPE_CHECKING:
#     from .voice_tools import VoiceTools
#     from .llm_tools import LLMTools
#     from .knowledge_tools import KnowledgeTools
#     from .validation_tools import ValidationTools

# # Public API: expose only main class-based containers & API
# __all__ = [
#     # Tool containers
#     "VoiceTools",
#     "LLMTools",
#     "KnowledgeTools",
#     "ValidationTools",
#     # Factory and utility functions
#     "create_tool_suite",
#     "get_tool_by_name",
#     "register_tools_with_crew",
#     # Constants
#     "SUPPORTED_LANGUAGES",
#     "TOOL_CATEGORIES"
# ]

# # Constants
# SUPPORTED_LANGUAGES = [
#     "en", "es", "fr", "de", "it", "pt", "ru", "zh",
#     "ja", "ko", "hi", "ar", "bn", "pa", "te", "mr",
#     "ta", "ur", "gu", "kn", "ml", "or"
# ]

# TOOL_CATEGORIES = {
#     "VOICE": ["speech_to_text", "text_to_speech", "language_detection"],
#     "LLM": ["generate_response", "generate_questions", "summarize", "paraphrase"],
#     "KNOWLEDGE": ["search_knowledge", "extract_wisdom", "find_practices"],
#     "VALIDATION": ["validate_response", "check_safety", "analyze_tone"]
# }

# # Factory: unified tool suite
# def create_tool_suite(config) -> Dict[str, Any]:
#     """
#     Create a complete suite of tools for all agents.

#     Args:
#         config: Configuration object

#     Returns:
#         dict: Dictionary of initialized tool containers
#     """
#     from .voice_tools import VoiceTools
#     from .llm_tools import LLMTools
#     from .knowledge_tools import KnowledgeTools
#     from .validation_tools import ValidationTools
#     return {
#         "voice": VoiceTools(config),
#         "llm": LLMTools(config),
#         "knowledge": KnowledgeTools(config),
#         "validation": ValidationTools(config)
#     }

# def get_tool_by_name(tool_name: str, config):
#     """
#     Get a specific tool container by name.

#     Args:
#         tool_name: Name of the tool container ('voice', 'llm', 'knowledge', 'validation')
#         config: Configuration object

#     Returns:
#         Tool container class instance or None
#     """
#     tool_mapping = {
#         "voice": lambda c: __import__("agents.tools.voice_tools", fromlist=["VoiceTools"]).VoiceTools(c),
#         "llm": lambda c: __import__("agents.tools.llm_tools", fromlist=["LLMTools"]).LLMTools(c),
#         "knowledge": lambda c: __import__("agents.tools.knowledge_tools", fromlist=["KnowledgeTools"]).KnowledgeTools(c),
#         "validation": lambda c: __import__("agents.tools.validation_tools", fromlist=["ValidationTools"]).ValidationTools(c),
#     }
#     tool_factory = tool_mapping.get(tool_name.lower())
#     if tool_factory:
#         return tool_factory(config)
#     return None

# # Tool registry for CrewAI (for UI/metadata/documentation)
# def register_tools_with_crew():
#     """
#     Register all tools with CrewAI framework.
#     Returns a list of tool configurations for CrewAI.
#     """
#     return [
#         {
#             "name": "speech_to_text",
#             "description": "Convert speech in any language to text",
#             "category": "VOICE"
#         },
#         {
#             "name": "text_to_speech",
#             "description": "Convert text to natural speech in multiple languages",
#             "category": "VOICE"
#         },
#         {
#             "name": "search_knowledge",
#             "description": "Search through spiritual and self-help texts",
#             "category": "KNOWLEDGE"
#         },
#         {
#             "name": "generate_response",
#             "description": "Generate empathetic and helpful responses",
#             "category": "LLM"
#         },
#         {
#             "name": "validate_response",
#             "description": "Ensure response safety and appropriateness",
#             "category": "VALIDATION"
#         }
#     ]

# # Initialization check for debug mode
# import os
# if os.getenv("DEBUG_MODE", "false").lower() == "true":
#     print(f"Agent Tools module v{__version__} initialized")
#     print(f"Supported languages: {len(SUPPORTED_LANGUAGES)}")
#     print(f"Tool categories: {list(TOOL_CATEGORIES.keys())}")

from .voice_tools import VoiceTools
from .llm_tools import LLMTools
from .knowledge_tools import KnowledgeTools
from .validation_tools import ValidationTools

__all__ = [
    "VoiceTools",
    "LLMTools",
    "KnowledgeTools",
    "ValidationTools"
]