Git Product home page Git Product logo

wox.plugin.chatgpt's Introduction

Wox launcher ChatGPT Plugin

logo2

Query the ChatGPT API from anywhere! This simple wrapper can be used as a Plugin for the awesome Wox launcher. Uses Flask to display the results in a ChatGPT-themed locally-hosted webpage. Only tested on Windows with Python 3.10.

Screenshots

chatgpt_wox_plugin

Quickstart

  1. Clone the repo: git clone https://www.github.com/Mnikley/Wox.Plugin.ChatGPT
  2. Install requirements: pip install -r requirements.txt
  3. Get an OpenAI API key: https://platform.openai.com/account/api-keys
  4. Open and edit app.py to enter your API key:
config = {
    "api_key": "place-your-api-key-here",
    ..
}
  1. Copy the entire folder Wox.Plugin.ChatGPT to your Wox Plugins folder (per default: C:\Users\MNikley\AppData\Local\Wox\app-1.4.1196\Plugins) and make sure the plugin is enabled. Restart Wox afterwards
  2. Run queries by entering gpt [QUERY] in your Wox launcher prompt, e.g. gpt what is love

Alternatively you can run the script directly via python app.py [QUERY]

Configuration

  • api_key: Your OpenAI API key
  • model: Used model (default: gpt-3.5-turbo, check https://platform.openai.com/docs/models/)
  • max_tokens: Maximum amount of returned tokens (longer = more expensive; default: 512)
  • temperature: Increase randomness (default: 0.15)
  • stream:: Stream response or wait for entire processed text (default: True)
  • price_per_token: Used for estimating costs (default: 0.002 / 1000 based on gpt-3.5-turbo)

Run via command line

  1. Run app:
python app.py
  1. Send queries via API endpoint /openai_call/QUERY, e.g.:
http://127.0.0.1:5000/openai_call/how%20much%20is%20the%20fish

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.