elismasilva commited on
Commit
c807c24
·
1 Parent(s): c11b8eb

updated doc and api dropdown label

Browse files
Files changed (2) hide show
  1. README.md +2 -1
  2. app.py +29 -28
README.md CHANGED
@@ -159,7 +159,8 @@ Visit `http://localhost:7860` in your browser.
159
  To use the full feature set, you will need a few API keys, which can be entered in the UI sidebar:
160
 
161
  - **GitHub Personal Token**: **Required** for actions that modify the repository, such as `Approve Action` (closing an issue) and `Sync Repository`. It needs `repo` scope permissions.
162
- - **LLM API Key** (Gemini, OpenAI, etc.): **Required** for manual AI actions like `Re-Analyze Issue` or generating the `Prioritization Report`. This may not be needed if server-side keys are enabled.
 
163
 
164
  ---
165
 
 
159
  To use the full feature set, you will need a few API keys, which can be entered in the UI sidebar:
160
 
161
  - **GitHub Personal Token**: **Required** for actions that modify the repository, such as `Approve Action` (closing an issue) and `Sync Repository`. It needs `repo` scope permissions.
162
+ - **Provider API Key** (Gemini, OpenAI, etc.): **Required** for manual AI actions like `Re-Analyze Issue` or generating the `Prioritization Report`. This may not be needed if server-side keys are enabled.
163
+ - **Gemini Assistant API Key**: **Required** for AI Assistant conversation. This may not be needed if server-side keys are enabled.
164
 
165
  ---
166
 
app.py CHANGED
@@ -31,7 +31,7 @@ BLAXEL_API_KEY = os.getenv("BLAXEL_API_KEY")
31
  GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
32
 
33
  # LOGIC LAYER
34
- def _validate_api_keys(llm_api_key, request, type="LLM"):
35
  USE_SERVER_KEYS = os.getenv("USE_SERVER_KEYS", "false").lower() in (
36
  "True",
37
  "true",
@@ -688,33 +688,34 @@ with gr.Blocks(title="GitRepo Inspector", theme=theme, css=css_code, head=APP_HE
688
  gr.Markdown("(For Manual Actions)")
689
 
690
  default_provider = "gemini"
691
- global_provider = gr.Dropdown(
692
- choices=list(AVAILABLE_MODELS_BY_PROVIDER.keys()),
693
- value=default_provider,
694
- label="LLM Provider"
695
- )
696
-
697
- # Use default provider list
698
- global_model = gr.Dropdown(
699
- choices=AVAILABLE_MODELS_BY_PROVIDER[default_provider],
700
- value=AVAILABLE_MODELS_BY_PROVIDER[default_provider][0],
701
- label="Model Name",
702
- allow_custom_value=True,
703
- interactive=True
704
- )
705
-
706
- global_llm_key = gr.Textbox(
707
- label="LLM API Key",
708
- type="password",
709
- placeholder="your API Key...",
710
- info="Required for approval and reanalysis actions"
711
- )
712
- global_gemini_key = gr.Textbox(
713
- label="Gemini Assistant API Key",
714
- type="password",
715
- placeholder="your API Key...",
716
- info="Gemini API Key required for AI Assistant Chat"
717
- )
 
718
  gr.Markdown("---")
719
  log_limit_slider = gr.Slider(
720
  minimum=10,
 
31
  GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
32
 
33
  # LOGIC LAYER
34
+ def _validate_api_keys(llm_api_key, request, type="Provider"):
35
  USE_SERVER_KEYS = os.getenv("USE_SERVER_KEYS", "false").lower() in (
36
  "True",
37
  "true",
 
688
  gr.Markdown("(For Manual Actions)")
689
 
690
  default_provider = "gemini"
691
+ with gr.Group():
692
+ global_provider = gr.Dropdown(
693
+ choices=list(AVAILABLE_MODELS_BY_PROVIDER.keys()),
694
+ value=default_provider,
695
+ label="LLM Provider"
696
+ )
697
+
698
+ # Use default provider list
699
+ global_model = gr.Dropdown(
700
+ choices=AVAILABLE_MODELS_BY_PROVIDER[default_provider],
701
+ value=AVAILABLE_MODELS_BY_PROVIDER[default_provider][0],
702
+ label="Model Name",
703
+ allow_custom_value=True,
704
+ interactive=True
705
+ )
706
+ with gr.Group():
707
+ global_llm_key = gr.Textbox(
708
+ label="Provider API Key",
709
+ type="password",
710
+ placeholder="your API Key...",
711
+ info="Required for approval and reanalysis actions"
712
+ )
713
+ global_gemini_key = gr.Textbox(
714
+ label="Gemini Assistant API Key",
715
+ type="password",
716
+ placeholder="your API Key...",
717
+ info="Gemini API Key required for AI Assistant Chat"
718
+ )
719
  gr.Markdown("---")
720
  log_limit_slider = gr.Slider(
721
  minimum=10,