Git Product home page Git Product logo

chatgpt-local-chatbot's Introduction

ChatGPT Local Chatbot

This script allows you to search a chatbot using a GUI. It uses the OpenAI API and the openai Python library to interact with the Chatbot API, and the tkinter library to create the GUI.

image

Prerequisites

How it works

This script uses the openai library to interact with the Chatbot API, and the tkinter library to create a simple GUI.

To use this script, you will need to sign up for an OpenAI API key and replace "YOUR_API_KEY_HERE" with your own API key. You can sign up for an API key and learn more about the Chatbot API at https://beta.openai.com/docs/api-reference/completion/create.

Usage

  • Replace "YOUR_API_KEY_HERE" in the following line with your own API key:

    openai.api_key = "YOUR_API_KEY_HERE" /// You will have to pay for this API after you complete your free trial.

  • Run the script: python3 chatgpt_local_chatbot.py

  • Enter your search query in the input field and click the "Search" button. The chatbot's response will be displayed in the result label.

Customization

You can customize the behavior of the chatbot by modifying the following parameters in the openai.Completion.create() function:

  • engine: The name of the chatbot model to use.
  • prompt: The search query to send to the chatbot.
  • max_tokens: The maximum number of tokens (words) in the chatbot's response.
  • temperature: Controls the creativity of the chatbot's response. A value of 0 will generate a more predictable response, while a value greater than 0 will generate a more creative and varied response.

You can also customize the appearance and behavior of the GUI by modifying the code in the tkinter section of the script.

I hope this helps! Let me know if you have any questions or if you need further assistance.

chatgpt-local-chatbot's People

Contributors

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