https://github.com/fredsiika/llm-chat-apps
Compilation of LLM chat-based apps
https://github.com/fredsiika/llm-chat-apps
Last synced: 7 months ago
JSON representation
Compilation of LLM chat-based apps
- Host: GitHub
- URL: https://github.com/fredsiika/llm-chat-apps
- Owner: fredsiika
- License: apache-2.0
- Created: 2023-07-28T15:19:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-28T15:55:06.000Z (about 2 years ago)
- Last Synced: 2025-01-26T19:43:16.647Z (8 months ago)
- Language: Python
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🎈 Streamlit + LLM Examples App
[](https://codespaces.new/streamlit/llm-examples?quickstart=1)
Starter examples for building LLM apps with Streamlit.
## Overview of the App
This app showcases a growing collection of LLM minimum working examples.
Current examples include:
- Chatbot
- File Q&A
- LangChain Quickstart
- LangChain PromptTemplate
- LangChain Search## Demo App
[](https://llm-examples.streamlit.app/)
### Get an OpenAI API key
You can get your own OpenAI API key by following the following instructions:
1. Go to https://platform.openai.com/account/api-keys.
2. Click on the `+ Create new secret key` button.
3. Next, enter an identifier name (optional) and click on the `Create secret key` button.### Enter the OpenAI API key in Streamlit Community Cloud
To set the OpenAI API key as an environment variable in Streamlit apps, do the following:
1. At the lower right corner, click on `< Manage app` then click on the vertical "..." followed by clicking on `Settings`.
2. This brings the **App settings**, next click on the `Secrets` tab and paste the API key into the text box as follows:```sh
OPENAI_API_KEY='xxxxxxxxxx'
```## Run it locally
Before activating a virtual environment (venv), you need to create the virtual environment. Here are the steps you typically follow:
1. Create a new virtual environment:
```bash
python3 -m venv {{path/to/venv}}
```
This command creates a new virtual environment at the specified path. Replace `{{path/to/venv}}` with the desired location for your virtual environment.2. Activate the virtual environment:
- For macOS/Linux (bash/zsh):
```bash
source {{path/to/venv}}/bin/activate
```
- For Windows (Command Prompt):
```bash
{{path/to/venv}}\Scripts\activate.bat
```
- For Windows (PowerShell):
```bash
{{path/to/venv}}\Scripts\Activate.ps1
```
Activating the virtual environment modifies the shell's environment variables to use the Python interpreter and packages installed within the virtual environment.After activating the virtual environment, you can install and use Python packages specific to that environment without interfering with the system-wide Python installation.
Remember to replace `{{path/to/venv}}` with the actual path where you created your virtual environment.
Note: The `python3` command assumes you have Python 3 installed. If you have a different version of Python installed, adjust the command accordingly (e.g., `python2`, `python3.9`, etc.).
3. Install requirements
```sh
pip install -r requirements.txt
```4. Run the application
```sh
streamlit run Chatbot.py
```