Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manekinekko/angular-openai-chat
A chatbot that uses OpenAI's GPT API to generate responses to user input.
https://github.com/manekinekko/angular-openai-chat
ai angular chatbot chatgpt gpt-3 gpt-4 nodejs openai
Last synced: 12 days ago
JSON representation
A chatbot that uses OpenAI's GPT API to generate responses to user input.
- Host: GitHub
- URL: https://github.com/manekinekko/angular-openai-chat
- Owner: manekinekko
- License: mit
- Created: 2023-02-23T16:25:32.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-24T14:21:46.000Z (almost 2 years ago)
- Last Synced: 2024-12-25T07:22:13.158Z (22 days ago)
- Topics: ai, angular, chatbot, chatgpt, gpt-3, gpt-4, nodejs, openai
- Language: TypeScript
- Homepage:
- Size: 184 KB
- Stars: 6
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# OpenAI Chat
## Description
This project is a simple chatbot that uses OpenAI's GPT-3 API to generate responses to user input. It is built using Angular and Material Design.
## Installation
Run `npm install` to install the project dependencies.
## Configuration
1. Create an account on [OpenAI](https://openai.com/).
2. Create an API key on [OpenAI's API Keys page](https://beta.openai.com/account/api-keys).
3. Create an `.env` file under `./api` and add the following environment variables:```bash
OPENAI_API_KEY=
```## Development server
Run `npx swa start` for a dev server. Navigate to `http://localhost:4280/`. The application will automatically reload if you change any of the source files.
## Build
Run `npx swa build` to build the project. The build artifacts will be stored in the `dist/openai-chat` directory for the Angular application and `./api` directory for the API.
## Deploy
Run `npx swa deploy` to deploy the application to Azure Static Web Apps. You will be prompted to login to Azure and select a subscription and resource group. You will also be prompted to create a new Static Web App or select an existing one.
Note: You will need to add the `OPENAI_API_KEY` environment variable to your Static Web App's configuration. Read more about [environment variables](https://learn.microsoft.com/azure/static-web-apps/application-settings).