https://github.com/inanyan/developstoday-task
Test task from DevelopsToday
https://github.com/inanyan/developstoday-task
Last synced: 2 days ago
JSON representation
Test task from DevelopsToday
- Host: GitHub
- URL: https://github.com/inanyan/developstoday-task
- Owner: InAnYan
- Created: 2025-02-14T12:50:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-17T12:04:06.000Z (over 1 year ago)
- Last Synced: 2025-02-24T14:47:49.891Z (over 1 year ago)
- Language: Python
- Size: 322 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI barmen chat-bot

Made as a test task for `DevelopsToday`.
This bot knows a lot about cocktails!
## Features
- Friendly chat-bot.
- Remembers what you like.
- Has extensive knowledge of various cocktails.
### Remembers what you like

### Can find similar cocktails

## How to Run this Project?
First, install the dependencies:
```python
pip install -r requirements.txt
```
Then, export your OpenAI API key to an environment variable:
```sh
export OPENAI_API_KEY=sk-...
```
Finally, you can run it as follows:
```python
fastapi dev src/main.py
```
And go to .
In case that command didn't work, you can try this instead:
```python
python -m fastapi dev src/main.py
```
(*Ensure you have `fastapi[standard]` installed*).
## How this Project is Implemented?
Tech stack:
- FastAPI
- LangChain
- OpenAI API
- Chroma (vector database)
Architectural division (2 layers):
1. `src/main.py`: the web-server. Connects core logic to end user.
2. `src/logic.py`: core AI logic.
Key moments:
- Vector database is filled with data at the beginning of the program.
- Update user preference and search the vector database using tools.
- User preference is stored in system message.
- Conversation is stored in RAM (meaning, it's not persisted).