AOSSIE-Org / AOSSIE-Org/Devr.AI

BUG: Invalid EMBEDDING_MAX_BATCH_SIZE Value Triggers ValueError in backend/config.py

Ouverte
#244 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
102
Forks
137
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### What happened?

## 📌 Issue Overview
`EMBEDDING_MAX_BATCH_SIZE` Crashes Application if Set to Non-Integer Value

## 🔍 Steps to Reproduce
1. Set the environment variable `EMBEDDING_MAX_BATCH_SIZE` to a non-integer value (e.g., `abc` or leave it empty).
2. Run the application.
3. The application attempts to convert the value to `int` in `backend/config.py`.
4. Show the error.

## 🎯 Expected Behavior
The application should handle invalid or missing `EMBEDDING_MAX_BATCH_SIZE` values gracefully and fall back to a safe default without crashing.

## 🚨 Actual Behavior
If `EMBEDDING_MAX_BATCH_SIZE` is set to a non-integer value or is empty, the application crashes with a `ValueError` in `backend/config.py`.

## 📷 Screenshot

## 💡 Suggested Improvements
- Add error handling in `backend/config.py` to catch invalid `EMBEDDING_MAX_BATCH_SIZE` values.
- Use the default value if parsing fails.

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.