@@ -26,21 +26,21 @@ import (
2626
2727type AgentPool struct {
2828 sync.Mutex
29- file string
30- pooldir string
31- pool AgentPoolData
32- agents map [string ]* Agent
33- managers map [string ]sse.Manager
34- agentStatus map [string ]* Status
35- apiURL , defaultModel , defaultMultimodalModel string
36- mcpBoxURL string
37- imageModel , localRAGAPI , localRAGKey , apiKey string
38- availableActions func (* AgentConfig ) func (ctx context.Context , pool * AgentPool ) []types.Action
39- connectors func (* AgentConfig ) []Connector
40- dynamicPrompt func (* AgentConfig ) func (ctx context.Context , pool * AgentPool ) []DynamicPrompt
41- filters func (* AgentConfig ) types.JobFilters
42- timeout string
43- conversationLogs string
29+ file string
30+ pooldir string
31+ pool AgentPoolData
32+ agents map [string ]* Agent
33+ managers map [string ]sse.Manager
34+ agentStatus map [string ]* Status
35+ apiURL , defaultModel , defaultMultimodalModel , defaultTTSModel string
36+ mcpBoxURL , defaultTranscriptionModel , defaultTranscriptionLanguage string
37+ imageModel , localRAGAPI , localRAGKey , apiKey string
38+ availableActions func (* AgentConfig ) func (ctx context.Context , pool * AgentPool ) []types.Action
39+ connectors func (* AgentConfig ) []Connector
40+ dynamicPrompt func (* AgentConfig ) func (ctx context.Context , pool * AgentPool ) []DynamicPrompt
41+ filters func (* AgentConfig ) types.JobFilters
42+ timeout string
43+ conversationLogs string
4444}
4545
4646type Status struct {
@@ -74,7 +74,7 @@ func loadPoolFromFile(path string) (*AgentPoolData, error) {
7474}
7575
7676func NewAgentPool (
77- defaultModel , defaultMultimodalModel , imageModel , apiURL , apiKey , directory , mcpBoxURL string ,
77+ defaultModel , defaultMultimodalModel , defaultTranscriptionModel , defaultTranscriptionLanguage , defaultTTSModel , imageModel , apiURL , apiKey , directory , mcpBoxURL string ,
7878 LocalRAGAPI string ,
7979 availableActions func (* AgentConfig ) func (ctx context.Context , pool * AgentPool ) []types.Action ,
8080 connectors func (* AgentConfig ) []Connector ,
@@ -96,25 +96,28 @@ func NewAgentPool(
9696 if _ , err := os .Stat (poolfile ); err != nil {
9797 // file does not exist, create a new pool
9898 return & AgentPool {
99- file : poolfile ,
100- pooldir : directory ,
101- apiURL : apiURL ,
102- defaultModel : defaultModel ,
103- defaultMultimodalModel : defaultMultimodalModel ,
104- mcpBoxURL : mcpBoxURL ,
105- imageModel : imageModel ,
106- localRAGAPI : LocalRAGAPI ,
107- apiKey : apiKey ,
108- agents : make (map [string ]* Agent ),
109- pool : make (map [string ]AgentConfig ),
110- agentStatus : make (map [string ]* Status ),
111- managers : make (map [string ]sse.Manager ),
112- connectors : connectors ,
113- availableActions : availableActions ,
114- dynamicPrompt : promptBlocks ,
115- filters : filters ,
116- timeout : timeout ,
117- conversationLogs : conversationPath ,
99+ file : poolfile ,
100+ pooldir : directory ,
101+ apiURL : apiURL ,
102+ defaultModel : defaultModel ,
103+ defaultMultimodalModel : defaultMultimodalModel ,
104+ defaultTranscriptionModel : defaultTranscriptionModel ,
105+ defaultTranscriptionLanguage : defaultTranscriptionLanguage ,
106+ defaultTTSModel : defaultTTSModel ,
107+ mcpBoxURL : mcpBoxURL ,
108+ imageModel : imageModel ,
109+ localRAGAPI : LocalRAGAPI ,
110+ apiKey : apiKey ,
111+ agents : make (map [string ]* Agent ),
112+ pool : make (map [string ]AgentConfig ),
113+ agentStatus : make (map [string ]* Status ),
114+ managers : make (map [string ]sse.Manager ),
115+ connectors : connectors ,
116+ availableActions : availableActions ,
117+ dynamicPrompt : promptBlocks ,
118+ filters : filters ,
119+ timeout : timeout ,
120+ conversationLogs : conversationPath ,
118121 }, nil
119122 }
120123
@@ -123,25 +126,28 @@ func NewAgentPool(
123126 return nil , err
124127 }
125128 return & AgentPool {
126- file : poolfile ,
127- apiURL : apiURL ,
128- pooldir : directory ,
129- defaultModel : defaultModel ,
130- defaultMultimodalModel : defaultMultimodalModel ,
131- mcpBoxURL : mcpBoxURL ,
132- imageModel : imageModel ,
133- apiKey : apiKey ,
134- agents : make (map [string ]* Agent ),
135- managers : make (map [string ]sse.Manager ),
136- agentStatus : map [string ]* Status {},
137- pool : * poolData ,
138- connectors : connectors ,
139- localRAGAPI : LocalRAGAPI ,
140- dynamicPrompt : promptBlocks ,
141- filters : filters ,
142- availableActions : availableActions ,
143- timeout : timeout ,
144- conversationLogs : conversationPath ,
129+ file : poolfile ,
130+ apiURL : apiURL ,
131+ pooldir : directory ,
132+ defaultModel : defaultModel ,
133+ defaultMultimodalModel : defaultMultimodalModel ,
134+ defaultTranscriptionModel : defaultTranscriptionModel ,
135+ defaultTranscriptionLanguage : defaultTranscriptionLanguage ,
136+ defaultTTSModel : defaultTTSModel ,
137+ mcpBoxURL : mcpBoxURL ,
138+ imageModel : imageModel ,
139+ apiKey : apiKey ,
140+ agents : make (map [string ]* Agent ),
141+ managers : make (map [string ]sse.Manager ),
142+ agentStatus : map [string ]* Status {},
143+ pool : * poolData ,
144+ connectors : connectors ,
145+ localRAGAPI : LocalRAGAPI ,
146+ dynamicPrompt : promptBlocks ,
147+ filters : filters ,
148+ availableActions : availableActions ,
149+ timeout : timeout ,
150+ conversationLogs : conversationPath ,
145151 }, nil
146152}
147153
@@ -334,11 +340,25 @@ func (a *AgentPool) startAgentWithConfig(name string, config *AgentConfig, obs O
334340 ctx := context .Background ()
335341 model := a .defaultModel
336342 multimodalModel := a .defaultMultimodalModel
343+ transcriptionModel := a .defaultTranscriptionModel
344+ transcriptionLanguage := a .defaultTranscriptionLanguage
345+ ttsModel := a .defaultTTSModel
337346
338347 if config .MultimodalModel != "" {
339348 multimodalModel = config .MultimodalModel
340349 }
341350
351+ if config .TranscriptionModel != "" {
352+ transcriptionModel = config .TranscriptionModel
353+ }
354+
355+ if config .TranscriptionLanguage != "" {
356+ transcriptionLanguage = config .TranscriptionLanguage
357+ }
358+ if config .TTSModel != "" {
359+ ttsModel = config .TTSModel
360+ }
361+
342362 if config .Model != "" {
343363 model = config .Model
344364 } else {
@@ -419,6 +439,9 @@ func (a *AgentPool) startAgentWithConfig(name string, config *AgentConfig, obs O
419439 WithLLMAPIURL (a .apiURL ),
420440 WithContext (ctx ),
421441 WithMCPServers (config .MCPServers ... ),
442+ WithTranscriptionModel (transcriptionModel ),
443+ WithTranscriptionLanguage (transcriptionLanguage ),
444+ WithTTSModel (ttsModel ),
422445 WithPeriodicRuns (config .PeriodicRuns ),
423446 WithPermanentGoal (config .PermanentGoal ),
424447 WithMCPSTDIOServers (config .MCPSTDIOServers ... ),
0 commit comments