Giter Site home page Giter Site logo

gpt-3_chatbot's Introduction

GPT-3 Chatbot

This project is a FastAPI application that interacts with the OpenAI GPT-3 model to create a chatbot.

Code Explanation

The main.py file contains the main logic of the application. It defines a function gpt_call that makes a call to the GPT-3 model with a list of messages and returns the model's response. It also defines two FastAPI routes: /new_chat and /gpt_response. The /new_chat route accepts a POST request with a message from the user, adds it to the list of messages, and returns an HTML response with the user's message. The /gpt_response route makes a call to the GPT-3 model with the list of messages, adds the model's response to the list of messages, and returns an HTML response with the model's response.

The application also serves static files from the static directory.

Project File Structure

  • main.py: This is the main Python file. It contains the logic of the application.
  • static: This is a directory that contains static files.
    • index.html: This is an HTML file that contains the structure of a web page.

gpt-3_chatbot's People

Contributors

kingler avatar

Watchers

 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.