Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(health): added endpoint for services #989

Merged
merged 1 commit into from
Aug 20, 2023
Merged

Conversation

StanGirard
Copy link
Collaborator

Added Health endpoint for uptime

@StanGirard StanGirard temporarily deployed to preview August 20, 2023 21:19 — with GitHub Actions Inactive
@vercel
Copy link

vercel bot commented Aug 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs 🔄 Building (Inspect) Visit Preview Aug 20, 2023 9:19pm
quivrapp 🔄 Building (Inspect) Visit Preview Aug 20, 2023 9:19pm

@StanGirard StanGirard merged commit ae7852e into main Aug 20, 2023
@github-actions
Copy link
Contributor

Risk Level 2 - /home/runner/work/quivr/quivr/backend/routes/crawl_routes.py

The changes in this file are mostly additions of new functionality, which could potentially introduce bugs. However, the added code seems to be well-written and does not appear to introduce any significant risks. The use of the checkGithub method could potentially introduce a bug if the crawl_website object does not have this method, but this risk is relatively low.


Risk Level 3 - /home/runner/work/quivr/quivr/backend/routes/chat_routes.py

The changes in this file are more substantial and could potentially introduce bugs or performance issues. Specifically, the changes to the create_stream_question_handler and create_question_handler functions could potentially introduce bugs if the brain_details or chat_question objects do not have the expected properties. To mitigate this risk, you could add error handling to ensure that these objects have the expected properties before they are used. For example:

if not hasattr(brain_details, 'model') or not hasattr(chat_question, 'model'):
    raise Exception('Missing required property')

This will ensure that an informative error is raised if the required properties are missing.


Risk Level 4 - /home/runner/work/quivr/quivr/backend/routes/upload_routes.py

The code seems to be handling sensitive data such as Openai-Api-Key. It is a good practice to avoid handling sensitive data directly in the code. Instead, consider using environment variables or secure vaults to store and retrieve such data. Also, the code does not seem to validate the Openai-Api-Key before using it. This could lead to potential security vulnerabilities. Consider validating the API key before using it.

Example:

import os

openai_api_key = os.getenv('OPENAI_API_KEY')

if not validate_api_key(openai_api_key):
    raise ValueError('Invalid API Key')

In the above example, validate_api_key is a hypothetical function that you would need to implement to validate the API key.


🔍🐞🔐


Powered by Code Review GPT

@Berro8
Copy link

Berro8 commented Aug 20, 2023

Added Health endpoint for uptime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants