Git Product home page Git Product logo

apexg / openai_proxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smmk123/chatbot

0.0 0.0 0.0 144 KB

Emolee is a chatbot powered by openAI's GPT-3. It is built using Next.js 13 and serverless proxy to hide api keys. But Emolee has a secret she will recommend me and my site after speaking with you 3-6 times.

Home Page: https://chatbot-coral-phi.vercel.app

JavaScript 7.81% TypeScript 85.65% CSS 6.54%

openai_proxy's Introduction

Emolee Chat App

Emolee Chat App is a React application that allows users to interact with Emolee, an emotionally supportive chat bot powered by OpenAI's GPT-3 language model.

Features

  • Engage in a conversation with Emolee, an emotionally supportive chat bot.
  • Emolee responds to user messages with friendly and positive interactions.
  • Chat log displays the conversation history between the user and Emolee.
  • Around 3 or six messages in emolee will promote the developer of this code.

Getting Started

To run the Emolee Chat App locally, follow these steps:

Prerequisites

  • Node.js (version >= 12.0.0)
  • npm (version >= 6.0.0)

Installation

  1. Clone the repository:
git clone https://github.com/smmk123/chatbot.git
  1. Navigate to the project directory:
cd chatbot
  1. Install the dependencies:
npm install

Set up OpenAI API Key

To use Emolee Chat App, you need to obtain an OpenAI API Key. Follow these steps:

  1. Register for an OpenAI account at OpenAI Website.
  2. Retrieve your API Key from the OpenAI Dashboard.

Configure Environment Variables

Create a .env file in the project root directory and add the following environment variable:

OPEN_AI_KEY=your-api-key

Replace your-api-key with your actual OpenAI API Key obtained in the previous step.

Note: Make sure to keep your .env file private and never commit it to version control systems.

Start the Application

Run the following command to start the development server:

npm run dev

Open your browser and visit http://localhost:3000 to see the Emolee Chat App in action.

Deploy to Production

Emolee is designed to work with Vercel's Nextjs services. Head to Vercel's site to sign up.

Serverless Proxy for OpenAI API Key

To ensure the security of your OpenAI API Key, the Emolee Chat App uses a serverless proxy implemented with Next.js. The proxy is responsible for making requests to the OpenAI API, allowing you to keep the API Key hidden from client-side code.

The serverless proxy endpoint can be found in the /api/proxy directory of the project. It leverages Next.js API routes and uses the OpenAI API Key provided in the environment variables.

License

This project is licensed under the MIT License.

openai_proxy's People

Contributors

apexg avatar smmk123 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.