File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,7 @@ def build_streamer(
194
194
query_configuration ,
195
195
chat_messages ,
196
196
crew_events_queue = crew_events_queue ,
197
+ session = session
197
198
)
198
199
return condensed_question , data_source_id , streaming_chat_response
199
200
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ def assemble_crew(
134
134
)
135
135
research_tools .append (crewai_retriever_tool )
136
136
137
- # Create a search tool if needed
137
+ # Create a search tool if needed # TODO: fix this because we don't use configuration.tools any more!
138
138
search_tool = None
139
139
if configuration .tools and "search" in configuration .tools :
140
140
search_tool = SerperDevTool ()
Original file line number Diff line number Diff line change 48
48
poison_pill ,
49
49
)
50
50
from .crew_events import CrewEvent
51
+ from ..metadata_apis .session_metadata_api import Session
51
52
52
53
if TYPE_CHECKING :
53
54
from ..chat .utils import RagContext
@@ -118,13 +119,14 @@ def streaming_query(
118
119
configuration : QueryConfiguration ,
119
120
chat_messages : list [ChatMessage ],
120
121
crew_events_queue : Queue [CrewEvent ],
122
+ session : Session
121
123
) -> StreamingAgentChatResponse :
122
124
mcp_tools : list [BaseTool ] = []
123
125
all_adapters : list [MCPServerAdapter ] = []
124
126
125
127
# Add adapters for each tool specified in the configuration
126
- if configuration . tools :
127
- for tool_name in configuration . tools :
128
+ if session . query_configuration and session . query_configuration . selected_tools :
129
+ for tool_name in session . query_configuration . selected_tools :
128
130
try :
129
131
adapter = get_mcp_server_adapter (tool_name )
130
132
print (f"Adding adapter for tool: { adapter } " )
You can’t perform that action at this time.
0 commit comments