File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -300,19 +300,22 @@ export class StreamService {
300300 subscriber ,
301301 ) ;
302302
303+ const tools = ( requestDto . tools || [ ] ) . map ( ( tool ) => {
304+ if ( tool . name === 'private_search' ) {
305+ return {
306+ ...tool ,
307+ namespace_id : namespaceId ,
308+ } as WizardPrivateSearchToolDto ;
309+ }
310+ return tool ;
311+ } ) ;
312+
303313 const wizardRequest : WizardAgentRequestDto = {
304314 namespace_id : namespaceId ,
305315 conversation_id : requestDto . conversation_id ,
306316 query : requestDto . query ,
307317 messages,
308- tools : requestDto . tools . map ( ( tool ) =>
309- tool . name === 'private_search'
310- ? ( {
311- ...tool ,
312- namespace_id : namespaceId ,
313- } as WizardPrivateSearchToolDto )
314- : tool ,
315- ) ,
318+ tools,
316319 enable_thinking : requestDto . enable_thinking ,
317320 lang : requestDto . lang ,
318321 } ;
You can’t perform that action at this time.
0 commit comments