Skip to content

Commit eca926b

Browse files
committed
Add README.md for the backend
1 parent 4610159 commit eca926b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/fastapi_app/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Backend
2+
3+
## Overview
4+
This directory contains code for an advanced chat-based application that uses a combination of Google search and OpenAI's chat completion to generate responses to user queries. The application is built using Python and includes the following main components:
5+
- `AdvancedRAGChat`: This class provides the main functionality for the chat-based application. It includes methods for generating chat completions using Azure OpenAI's chat completion API, performing Google searches, and running the chat-based application.
6+
- `PostgresSearcher`: This class provides functionality for searching a Postgres database.
7+
- `llm_tools.py`: This module contains code for building and using custom functions within the chat-based application, such as Google search and specifying a package.
8+
- `postgres_models.py`: This module contains data models for the chat-based application's database, including thoughts and metadata.
9+
- `api_routes.py`: This module contains the FastAPI routes for the application, including the `/chat` route.
10+
- `google_search.py`: This module contains a function `google_search_function` for performing a Google search given a search query.
11+
- `seed_hd_data.py`: This script is for inserting **HD**'s data into the database.
12+
- `get_token.py`: This script is for generating an Azure OAuth token, used as a temporary password for the PostgreSQL Database.
13+
14+
15+
## Usage
16+
To use this codebase locally, you can these steps:
17+
1. Run `python3 -m uvicorn fastapi_app:create_app --factory --reload`.
18+
1. Send a `POST` request to the `/chat` route.

0 commit comments

Comments
 (0)