Support capturing /llm endpoint requests to external database
This commit includes support for logging all requests and responses made to the /llm endpoint to an external database. It introduces a new file, gull_api/db.py, that handles the database configuration and log creation, and modifies gull_api/main.py to incorporate the new logging mechanism.
Additionally, updates have been made to the Docker configuration to accommodate local SQLite storage when running the container. The Dockerfile now creates a directory for storing the SQLite database, and the README has been updated with instructions for volume mounting this directory. The .dockerignore file has been introduced to exclude unnecessary directories from the Docker build context.
Changes:
- New file gull_api/db.py for handling database interactions.
- Updated gull_api/main.py to log requests/responses to /llm endpoint.
- Dockerfile creates a directory for SQLite database storage.
- Updated README.md for instructions on Docker volume mounting.
- Introduced .dockerignore file.
- Added SQLAlchemy dependency in pyproject.toml.
- Updated tests/test_api.py for additional test cases.
This enhancement will allow for better tracking and debugging of API requests by storing all the request/response data for future reference and analysis.
**Full Changelog**: https://github.com/mdbecker/gull_api/compare/0.0.7...0.0.8