diff --git a/.env.docker.example b/.env.docker.example index 537c321..6cd740b 100644 --- a/.env.docker.example +++ b/.env.docker.example @@ -13,7 +13,7 @@ POSTGRES_PASSWORD=postgres REDIS_ENDPOINT=redis://redis:6379/0 -ENVIRONMENT=development +ENVIRONMENT=production AI_STRATEGY=OLLAMA #OLLAMA,OPENAI,ANTHROPIC diff --git a/src/app.py b/src/app.py index c472fac..fe3afac 100644 --- a/src/app.py +++ b/src/app.py @@ -48,8 +48,11 @@ def health(): "uptime": round(time.time() - start_time, 2), "external_modules": {"ollama": ollama_health}, "urls": { - # "llm": llm_service.get_url(), - "redis": config.redis_endpoint, + "redis": ( + config.redis_endpoint + if config.environment == "development" + else "retracted" + ), # this leaks the db user and password in dev mode "postgres": ( config.get_db_url() diff --git a/src/routes/v1/upload.py b/src/routes/v1/upload.py index 4777913..c98d39c 100644 --- a/src/routes/v1/upload.py +++ b/src/routes/v1/upload.py @@ -60,9 +60,9 @@ async def upload( finding_repository.create_findings(findings) worker_input = GenerateReportInput( recommendation_task_id=recommendation_task.id, - generate_long_solution=data.preferences.long_description or True, - generate_search_terms=data.preferences.search_terms or True, - generate_aggregate_solutions=data.preferences.aggregated_solutions or True, + generate_long_solution=data.preferences.long_description, + generate_search_terms=data.preferences.search_terms, + generate_aggregate_solutions=data.preferences.aggregated_solutions, ) celery_result = worker.send_task( diff --git a/src/test/mock_llm.py b/src/test/mock_llm.py index 84519ed..2172e1b 100644 --- a/src/test/mock_llm.py +++ b/src/test/mock_llm.py @@ -58,7 +58,7 @@ def get_url(self) -> str: return self.generate_url def _generate(self, prompt: str, json=True) -> Dict[str, str]: - print(prompt) + # TODO: Mock Aggregated Solution Responses and Subdivision Responses print(f"{answer_in_json_prompt('recommendation')}".format()) if f"{answer_in_json_prompt('combined_description').format()}" in prompt: return {"combined_description": "combined_description"}