GithubHelp home page GithubHelp logo

wteo / chatgpt Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 355 KB

ChatBox for Junior Devs: an interactive web app using OpenAI GPT-3.5 API to assist learners with coding, tech Q&A, and code reviews. Built with JavaScript, React, and SASS.

HTML 2.47% JavaScript 79.12% SCSS 18.41%

chatgpt's Introduction

ChatBox for Junior Developers

ChatBox is a simple app created for junior developers to learn and interact with OpenAI's GPT-3.5 based AI. This app allows users to ask general questions related to coding, tech, and code reviews.

Technologies

  • JavaScript
  • React
  • SASS
  • OpenAI API

Prerequisites

  • Node.js (LTS version recommended)
  • npm or yarn
  • OpenAI API Key

Getting Started

  1. Clone the repository to your local machine.
git clone https://github.com/yourusername/chatbox-for-junior-devs.git
cd chatbox-for-junior-devs
  1. Install the dependencies.
npm install
  1. Obtain your OpenAI API Key by signing up for an account at https://beta.openai.com/signup/. After signing up, you will be able to generate an API key.

  2. Create a .env file in the root of the project and add your API key to it.

REACT_APP_OPENAI_API_KEY=your_api_key_here
  1. Start the development server.
npm start

The app should now be running on http://localhost:3000. You can now use the chatbox to interact with the AI and learn about coding and tech.

Contact

Feel free to reach out to the creator of the project if you have any questions or suggestions:

chatgpt's People

Contributors

wteo avatar wendyteo avatar

Stargazers

 avatar ProdyPanda avatar

Watchers

Sougata Khan avatar Kostas Georgiou avatar  avatar

chatgpt's Issues

Update ChatGPT API for Seamless Contextual Integration Across Chat Sessions

Description:
As an AI chatbot, the ChatGPT API requires an update to seamlessly integrate context between the user and AI across chat sessions. Currently, the context is lost from one chat conversation to the next, resulting in a fragmented conversation history.

The updated API should maintain a seamless conversation flow with contextual integration, allowing for more personalized responses and better understanding of the user's intentions. When a user enters a new message, the API should take into account the previous chat exchanges to maintain the conversation context, even if the chat session has ended and a new one has begun.

To achieve this, the following technical modifications need to be made:

Technical Spec:
The ChatGPT API needs to store and retrieve previous conversation data. One approach is to store all previous chat messages as an array in memory. The API can then update this array with every new message received from the user. The updated array can be sent as part of the CreateChatCompletionRequest messages (https://platform.openai.com/docs/api-reference/chat/create#chat/create-messages) field, which expects an array of ChatCompletionRequestMessage objects. However, storing all previous messages in memory can lead to memory issues in the long run. A more scalable solution would be to store the messages in a database or other persistent storage, which can be queried and updated as needed. This can be implemented in a separate story.

openai.ChatCompletion.create(
  model="gpt-3.5-turbo",
  messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Who won the world series in 2020?"},
        {"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},
        {"role": "user", "content": "Where was it played?"}
    ]
)

This implementation would be very different if this open issue was implemented by openapi - openai/openai-node#61

Testing:
To ensure the updated API works correctly, thorough testing is necessary. This testing should include unit testing, integration testing, and performance testing to ensure the API is stable, reliable, and performs well under different conditions.

Acceptance Criteria:

  • The ChatGPT API should be updated to seamlessly integrate context between the user and AI across chat sessions.
  • The updated API should maintain a seamless conversation flow with contextual integration, allowing for more personalized responses and better understanding of the user's intentions.
  • The API should take into account previous chat exchanges, even if the chat session has ended and a new one has begun, to maintain the conversation context.
  • The chat history should be displayed chronologically with integrated context, and users should be able to scroll up and down to view their previous messages.
  • The ChatGPT API should store the chat history for each user session and seamlessly integrate it into subsequent chat sessions.
  • Thorough testing should be conducted to ensure the updated API is stable, reliable, and performs well under different conditions.

By implementing these changes, the ChatGPT API can provide a more personalized and contextualized user experience, leading to better engagement and satisfaction.

This Story was created using ChatGPT 3 ๐Ÿค–

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.