CdC-SI / eak-copilot

The official repository of the EAK-Copilot project as part of the Innovation Fellowship 2024.
https://cdc-si.github.io/eak-copilot/
GNU General Public License v3.0
4 stars 0 forks source link

Refactored API logic #165

Closed K-Schubert closed 1 month ago

K-Schubert commented 1 month ago

Overview

Refactored repo structure and docker-compose.yml for API services.

Issue Reference:

- Refactor API logic #144 

Changes Made

Move logic for autocomplete from api/ to autocomplete/. Rename "fastapi" service to "autocomplete" in docker-compose.yml. Update dependency on fastapi to autocomplete service. Rename /search to /exact_match. Add /fuzzy_match and /semantic_search_match endpoints to autocomplete/app/main.py Delete "chatbot" folder and chatbot service in docker-compose.yml Update .env.example REACT_APP_QUERY_AUTOCOMPLETE_API_URL with autocomplete service url. Update autocomplete/requirements.txt with up-to-date library versions. Merge feature/setup-baseline-rag branch with feature/144-refactor-api-logic branch. Update rag/requirements.txt. Refactor API logic with asyncpg instead of psycopg2. Create 'faq_embeddings' table in db/init.sql. Add indexing/app/main.py, indexing/Dockerfile and indexing/requirements.txt with dummy endpoints. Add Add indexing service in docker-compose.yml.

Refactor API endpoints according to best practice naming conventions and functionality.

https://github.com/CdC-SI/eak-copilot/issues/171 https://github.com/CdC-SI/eak-copilot/issues/143 https://github.com/CdC-SI/eak-copilot/issues/148 https://github.com/CdC-SI/eak-copilot/issues/33 https://github.com/CdC-SI/eak-copilot/issues/149 https://github.com/CdC-SI/eak-copilot/issues/150

Testing

- Ran docker-compose build and up, tested autocomplete service with frontend.

Screenshots

None

Additional Notes

- Need to change API URL for rag services in frontend (chatgpt-minimal).

Requested Reviewers

@tabee