Coder Social home page Coder Social logo

aris-budiman / openai-chat-endpoint-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lablab-ai/openai-chat-endpoint-boilerplate

0.0 0.0 0.0 6 KB

Console based chat application boilerplate for gpt-3.5-turbo and gpt-4 model

Home Page: https://replit.com/@ezzcodeezzlife/openai-chat-endpoint-boilerplate?v=1

Python 100.00%

openai-chat-endpoint-boilerplate's Introduction

GPT-3.5-Turbo / GPT-4 Chatbot Boilerplate

This repository contains a simple Python-based boilerplate code for using OpenAI's GPT-3.5-turbo and GPT-4 model to create a chatbot. This chatbot utilizes the OpenAI API and Tiktoken library to manage tokens and costs.

Getting Started

Before you can use this boilerplate, you'll need to set up a few things:

  1. Sign up for an OpenAI account and obtain an API key.
  2. Install the required Python libraries by running pip install openai tiktoken python-dotenv.

Usage

  1. Clone this repository:

    git clone https://github.com/lablab-ai/openai-chat-endpoint-boilerplate.git
    cd openai-chat-endpoint-boilerplate
    
  2. Create a .env file in the root directory of the project and add your OpenAI API key:

    OPENAI_API_KEY=your_openai_api_key
    
  3. Run the chatbot script:

    python openai-chat-endpoint-boilerplate.py
    
  4. Start chatting with the bot by running the openai-chat-endpoint-boilerplate.py file


Artificial Intelligence Hackathons, tutorials and Boilerplates

Join the LabLab Discord

Discord Banner 1
On lablab discord, we discuss this repo and many other topics related to artificial intelligence! Checkout upcoming Artificial Intelligence Hackathons Event

Acclerating innovation through acceleration

openai-chat-endpoint-boilerplate's People

Contributors

ezzcodeezzlife 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.