Skip to content

Commit 2915237

Browse files
committed
Store infrence url and model name as env variable
No need to store them as secretes. Makes debugging easier.
1 parent eded529 commit 2915237

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/extension-ai-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ jobs:
7070
7171
- name: Run AI analysis
7272
env:
73-
INFERENCE_URL: ${{ secrets.INFERENCE_URL }}
74-
INFERENCE_MODEL: ${{ secrets.INFERENCE_MODEL }}
73+
INFERENCE_URL: ${{ vars.INFERENCE_URL }}
74+
INFERENCE_MODEL: ${{ vars.INFERENCE_MODEL }}
7575
INFERENCE_API_KEY: ${{ secrets.INFERENCE_API_KEY }}
7676
id: ai-analysis
7777
run: |

scripts/extension_ai_analysis.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ def ask_question(system_msg, question):
170170
except Exception as e:
171171
import traceback
172172
traceback.print_exc()
173-
print(data)
173+
print(f"Request data: {data}", file=sys.stderr)
174+
print(f"Response status code: {response.status_code}", file=sys.stderr)
175+
print(f"Response content: {response.text}", file=sys.stderr)
174176
raise RuntimeError(f"Error or unexpected response: {response.json()["error"]["message"]}")
175177

176178
return answer

0 commit comments

Comments
 (0)