# demo-streamlit-simple-openai-chatgpt **Repository Path**: flameleo11/demo-streamlit-simple-openai-chatgpt ## Basic Information - **Project Name**: demo-streamlit-simple-openai-chatgpt - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-02-20 - **Last Updated**: 2024-02-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 🎈 Streamlit + LLM Examples App [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](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 - Chat with Internet search - LangChain Quickstart - LangChain PromptTemplate - Chat with user feedback ## Demo App [![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](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 ```sh virtualenv .venv source .venv/bin/activate pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com streamlit run Chatbot.py ```