@@ -365,19 +365,26 @@ def create_interface():
365
365
repo_button = gr .Button ("Process Repository" )
366
366
repo_output = gr .Textbox (label = "Repository Processing Output" )
367
367
368
+ # Define collection choices once to ensure consistency
369
+ collection_choices = [
370
+ "PDF Collection" ,
371
+ "Repository Collection" ,
372
+ "Web Knowledge Base" ,
373
+ "General Knowledge"
374
+ ]
375
+
368
376
with gr .Tab ("Standard Chat Interface" ):
369
377
with gr .Row ():
370
378
with gr .Column (scale = 1 ):
371
- # Create model choices with quantization options
372
379
standard_agent_dropdown = gr .Dropdown (
373
380
choices = model_choices ,
374
381
value = model_choices [0 ] if model_choices else None ,
375
382
label = "Select Agent"
376
383
)
377
384
with gr .Column (scale = 1 ):
378
385
standard_collection_dropdown = gr .Dropdown (
379
- choices = [ "PDF Collection" , "Repository Collection" , "Web Knowledge Base" , "General Knowledge" ] ,
380
- value = "PDF Collection" ,
386
+ choices = collection_choices ,
387
+ value = collection_choices [ 0 ] ,
381
388
label = "Select Knowledge Base" ,
382
389
info = "Choose which knowledge base to use for answering questions"
383
390
)
@@ -386,7 +393,7 @@ def create_interface():
386
393
> - This interface ALWAYS uses the selected collection without performing query analysis.
387
394
> - "PDF Collection": Will ALWAYS search the PDF documents regardless of query type.
388
395
> - "Repository Collection": Will ALWAYS search the repository code regardless of query type.
389
- > - "Web Knowledge Base": Will ALWAYS search the web content regardless of query type.
396
+ > - "Web Knowledge Base": Will ALWAYS search web content regardless of query type.
390
397
> - "General Knowledge": Will ALWAYS use the model's built-in knowledge without searching collections.
391
398
""" )
392
399
standard_chatbot = gr .Chatbot (height = 400 )
@@ -398,16 +405,15 @@ def create_interface():
398
405
with gr .Tab ("Chain of Thought Chat Interface" ):
399
406
with gr .Row ():
400
407
with gr .Column (scale = 1 ):
401
- # Create model choices with quantization options
402
408
cot_agent_dropdown = gr .Dropdown (
403
409
choices = model_choices ,
404
410
value = model_choices [0 ] if model_choices else None ,
405
411
label = "Select Agent"
406
412
)
407
413
with gr .Column (scale = 1 ):
408
414
cot_collection_dropdown = gr .Dropdown (
409
- choices = [ "PDF Collection" , "Repository Collection" , "Web Knowledge Base" , "General Knowledge" ] ,
410
- value = "PDF Collection" ,
415
+ choices = collection_choices ,
416
+ value = collection_choices [ 0 ] ,
411
417
label = "Select Knowledge Base" ,
412
418
info = "Choose which knowledge base to use for answering questions"
413
419
)
@@ -416,7 +422,7 @@ def create_interface():
416
422
> - When a specific collection is selected, the system will ALWAYS use that collection without analysis:
417
423
> - "PDF Collection": Will ALWAYS search the PDF documents.
418
424
> - "Repository Collection": Will ALWAYS search the repository code.
419
- > - "Web Knowledge Base": Will ALWAYS search the web content.
425
+ > - "Web Knowledge Base": Will ALWAYS search web content.
420
426
> - "General Knowledge": Will ALWAYS use the model's built-in knowledge.
421
427
> - This interface shows step-by-step reasoning and may perform query analysis when needed.
422
428
""" )
0 commit comments