Commit
·
c807c24
1
Parent(s):
c11b8eb
updated doc and api dropdown label
Browse files
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 |
-
- **
|
|
|
|
| 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="
|
| 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 |
-
|
| 692 |
-
|
| 693 |
-
|
| 694 |
-
|
| 695 |
-
|
| 696 |
-
|
| 697 |
-
|
| 698 |
-
|
| 699 |
-
|
| 700 |
-
|
| 701 |
-
|
| 702 |
-
|
| 703 |
-
|
| 704 |
-
|
| 705 |
-
|
| 706 |
-
|
| 707 |
-
|
| 708 |
-
|
| 709 |
-
|
| 710 |
-
|
| 711 |
-
|
| 712 |
-
|
| 713 |
-
|
| 714 |
-
|
| 715 |
-
|
| 716 |
-
|
| 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,
|