diff --git a/.github/workflows/self-host-CD.yml b/.github/workflows/self-host-CD.yml index be87fbd5..fd8de466 100644 --- a/.github/workflows/self-host-CD.yml +++ b/.github/workflows/self-host-CD.yml @@ -23,11 +23,13 @@ jobs: TWILIO_AUTH_TOKEN: ${{secrets.TWILIO_AUTH_TOKEN}} TWILIO_PHONE_NUMBER: ${{secrets.TWILIO_PHONE_NUMBER}} OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY}} + DAY_SMS_LIMIT: 5 run: sudo docker run -d -p 8080:8080 \ --name disaster-alert-container \ --network disaster-net \ - -e TWILIO_ACCOUNT_SID=${{secrets.TWILIO_ACCOUNT_SID}} \ - -e TWILIO_AUTH_TOKEN=${{secrets.TWILIO_AUTH_TOKEN}} \ - -e TWILIO_PHONE_NUMBER=${{secrets.TWILIO_PHONE_NUMBER}} \ - -e OPENAI_API_KEY=${{secrets.OPENAI_API_KEY}} \ + -e TWILIO_ACCOUNT_SID=$TWILIO_ACCOUNT_SID \ + -e TWILIO_AUTH_TOKEN=$TWILIO_AUTH_TOKEN \ + -e TWILIO_PHONE_NUMBER=$TWILIO_PHONE_NUMBER \ + -e OPENAI_API_KEY=$OPENAI_API_KEY \ + -e DAY_SMS_LIMIT=$DAY_SMS_LIMIT \ jkuznik/disaster-alert \ No newline at end of file diff --git a/src/main/java/pl/ateam/disasteralerts/airiskassessment/RiskAssessmentService.java b/src/main/java/pl/ateam/disasteralerts/airiskassessment/RiskAssessmentService.java index 9ebfbbca..c33fec8f 100644 --- a/src/main/java/pl/ateam/disasteralerts/airiskassessment/RiskAssessmentService.java +++ b/src/main/java/pl/ateam/disasteralerts/airiskassessment/RiskAssessmentService.java @@ -10,7 +10,7 @@ @Slf4j class RiskAssessmentService { - public static final double RISK_THRESHOLD = 0.7; + public static final double RISK_THRESHOLD = 0.3; private final OpenAIClient openAIClient; boolean assessRisk(DisasterAddDTO disasterAddDTO) { diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index a865fa92..25fd2f87 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -27,7 +27,7 @@ spring: ai: openai: - api-key: "${{ secrets.OPENAI_API_KEY }}" + api-key: ${OPENAI_API_KEY} chat: options: model: gpt-4o