Skip to content

Commit 426b7a8

Browse files
committed
feat: Update workflow triggers and enhance README for clarity and project description
1 parent b41dccb commit 426b7a8

File tree

2 files changed

+94
-49
lines changed

2 files changed

+94
-49
lines changed

.github/workflows/publish-docker-image.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
branches:
66
- main
77
- dev
8+
paths:
9+
- 'src/**'
10+
- 'pages/**'
11+
- 'Dockerfile.prod'
12+
- 'locale/**'
13+
- 'requirements.prod.txt'
814

915
jobs:
1016
push_to_registries:

README.md

Lines changed: 88 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,145 @@
1-
# LangChain Streamlit Chatbot
1+
# ask.UOS
2+
3+
*AI chatbot for applicants and students – get instant answers about studies, teaching, and campus life.*
4+
25
(Under development)
36

4-
This project is a chatbot application built using LangChain and Streamlit. The chatbot can interact with users, summarize content, and handle various tasks using different tools and APIs.
7+
---
58

69
## Table of Contents
710

811
- [Overview](#overview)
912
- [Features](#features)
1013
- [Setup](#setup)
11-
- [Translation Mechanism](#translation_mechanism)
14+
- [Development with Docker](#development-with-docker)
15+
- [Production with Docker](#production-with-docker)
16+
- [Configuration](#configuration)
17+
- [Milvus Vector DB](#milvus-vector-db)
18+
- [Translation Mechanism](#translation-mechanism)
1219

20+
---
1321

1422
## Overview
1523

16-
The LangChain Streamlit Chatbot is designed to provide an interactive interface for users to communicate with a chatbot and thus access to updated information (In this case about a University). It leverages the LangChain library for natural language processing and Streamlit for the web interface.
24+
ask.UOS is designed to provide an interactive interface for users to communicate with a chatbot and access up-to-date university information. It leverages the `LangChain` library for natural language processing and `Streamlit` for the web interface. The system supports both German and English, and can be easily extended to other languages.
25+
26+
ask.UOS can answer a wide range of general questions about university life in just a few moments, including inquiries about the application process, academic requirements, and various study programs. The chatbot enables users to receive quick support in a conversational manner, without having to wait for office hours or search for the right contact person—available 24/7. For university departments such as student advisory services, the chatbot also helps reduce the volume of support requests.
27+
28+
---
1729

1830
## Features
1931

20-
- Interactive chatbot interface
21-
- Content summarization
32+
- Interactive chatbot interface for students and applicants
33+
- Content summarization and document insights
2234
- PDF reading and processing
2335
- Web scraping and data extraction
36+
- Multilingual support (German and English)
2437
- Customizable prompts and responses
38+
- Vector database (Milvus) for efficient unstructured data retrieval
39+
40+
---
2541

2642
## Setup
2743

2844
### Prerequisites
2945

30-
- See `requirements.txt`
31-
- Docker ( for containerization)
46+
- [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/)
47+
- (For development) See `requirements.txt`
48+
- (For production) See `requirements.prod.txt`
3249

50+
---
3351

34-
### Application Configuration
35-
This application uses a configuration file (`config.yaml`) to manage its settings. The settings are structured in a way that allows for easy customization without modifying the source code. The configuration is validated at startup using Pydantic, ensuring that all required fields are present and correctly formatted.
52+
### Development with Docker
3653

37-
#### Congiguration File `config.yaml`
54+
1. **Clone the repository**
55+
```sh
56+
git clone <your-repo-url>
57+
cd <your-repo>
58+
```
3859

39-
The `config.yaml` file should be placed in the root directory of the application. Modify the existing file accordingly (If necessary).
60+
2. **Create and configure environment file**
61+
```sh
62+
cp .env.dev-example .env.dev
63+
# Edit .env.dev as needed
64+
```
4065

66+
3. **Start the application**
67+
```sh
68+
docker compose up -d
69+
```
4170

42-
### Installation
71+
4. **Access the chatbot**
72+
Open [http://localhost:8501/](http://localhost:8501/) in your browser.
4373

44-
You can develop or deploy this application using Docker.
74+
**Note:** If you run the application without Docker, you must set up a Milvus server manually.
4575

46-
#### Development
76+
---
4777

78+
### Production with Docker
4879

49-
1. Create a `.env.dev` file from `env.dev-example` and modify it accordingly.
50-
```
51-
cp .env.dev-example .env.dev
80+
1. **Create and configure environment file**
81+
```sh
82+
cp .env.prod-example .env.prod
83+
# Edit .env.prod as needed
5284
```
53-
2. Start the ChatBot application
85+
86+
2. **Set up Nginx configuration (optional, for reverse proxy)**
87+
```sh
88+
cp ./nginx/nginx.conf.example nginx.conf
89+
# Edit nginx.conf as needed
5490
```
55-
docker compose up -d
91+
92+
3. **Start the application in production mode**
93+
```sh
94+
docker compose -f docker-compose.prod.yml up -d
5695
```
57-
3. To access the ChatBot visit ` http://localhost:8501/`
58-
59-
**Note:** If you run the application without Docker; you need to set up a chromadb server manually.
6096

61-
#### Production
97+
---
6298

63-
1. Create a `.env.prod` file from `env.prod-example` and modify it accordingly.
64-
```
65-
cp .env.prod-example .env.prod
66-
```
67-
2. Create a `nginx.conf` file from `nginx.conf-example` and modify it accordingly
68-
```
69-
cp ./nginx/nginx.conf.example nginx.conf
70-
```
99+
## Configuration
71100

72-
3. Start the ChatBot application
73-
```
74-
docker compose -f docker-compose.prod.yml up
101+
This application uses a configuration file (`config.yaml`) to manage its settings. The configuration is validated at startup using `Pydantic`, ensuring all required fields are present and correctly formatted.
75102

103+
- Modify the example file as needed for your environment.
76104

105+
```sh
106+
cp config_example.yamo config.yaml
107+
# Edit config.yaml as needed
108+
```
77109

110+
---
78111

79-
### Chroma DB
112+
## Milvus Vector DB
80113

81-
- Data: Place the documents to be processed and embedded here `src/data`
114+
- A vector database (Milvus) is used for indexing and storage of unstructured data (e.g., pdf files).
115+
- Milvus is automatically set up via Docker Compose and does not require manual installation.
116+
- If you are already running a Milvus instance, you can connect ask.UOS with it. See `config_example.yaml`
82117

118+
---
83119

84120
## Translation Mechanism
85121

86-
87-
This project supports both German and English languages, allowing users to switch between them seamlessly. The translation mechanism is implemented using the `gettext` library: a standard for internationalization and localization in Python.
122+
ask.UOS supports both German and English, allowing users to switch languages seamlessly. The translation mechanism is implemented using Python’s `gettext` library.
88123

89124
### How It Works
90125

91-
1. Translation Setup:
92-
- The system generates a `base.mo`file from `locale/de/LC_MESSAGES/base.po` (This file is autmatically generated when the software is installed using `Docker`)
93-
- The project sets up the translation for German using `gettext.translation`. It installs the German translation and provides a function to translate text.
94-
95-
2. Language Initialization:
126+
1. **Translation Setup**
127+
- The system generates a `base.mo` file from `locale/de/LC_MESSAGES/base.po` (automatically during Docker build).
128+
- The project sets up German translation using `gettext.translation` and provides a function for dynamic text translation.
96129

97-
- The project, using `Streamlit`, sets up a radio button for language selection. It defaults to German if no language is chosen.
98-
- When the user selects a language, the application updates the session state and configuration based on the selected language.
130+
2. **Language Initialization**
131+
- Streamlit presents a radio button for language selection (default: German).
99132
- The selected language is stored in the session state and query parameters.
100133

134+
3. **Usage in Streamlit**
135+
- Throughout the app, the translation function is used to display text in the user’s chosen language.
136+
137+
138+
139+
---
140+
141+
## License
101142

102-
3. Usage in Streamlit:
143+
[MIT](LICENSE)
103144

104-
- Throughout the Streamlit application, the translation function from the session state is used to translate text dynamically based on the selected language.
105145

106-
By following this approach, the project ensures that all user-facing text can be easily translated and displayed in the user's preferred language.

0 commit comments

Comments
 (0)