GithubHelp home page GithubHelp logo

viniciuspereiras / openaichat Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 414 KB

An unofficial, and completely bad client (keep in mind it's a weird way of doing this) to use OpenAI's chat in python, feel free to add it to your projects, implement speech recognition, text to speach and whatever something else you think is cool.

Python 100.00%

openaichat's Introduction

alt text

OpenAI ChatGPT

An unofficial, and completely bad client (keep in mind it's a weird way of doing this) to use OpenAI's Chat GPT in python, feel free to add it to your projects, implement speech recognition, text to speach and whatever something else you think is cool.

Examples

alt text

How to configure

  • Open your burp suite browser, log into your account and go to chat page
  • Turn on the interceptation of the requests, send a message in chat
  • Do some fowards and when this endpoint appears:

alt text

  • Send to repeater, now click with right button -> extensions -> Copy as python requests
  • Open main.py file and Ctrl+V into do_request()
  • Now you need to change somethings:
json={"action": "variant", "conversation_id": "...", "messages": [{"content": {"content_type": "text", "parts": ["MESSAGE"]}, "id": "...", "role": "user"}], "model": "...", "parent_message_id": "..."}
#change to:
json={"action": "variant", "conversation_id": "...", "messages": [{"content": {"content_type": "text", "parts": [data_text]}, "id": "...", "role": "user"}], "model": "...", "parent_message_id": "..."}

and

requests.post(burp0_url, headers=burp0_headers, cookies=burp0_cookies, json=burp0_json)
#change to:
return requests.post(burp0_url, headers=burp0_headers, cookies=burp0_cookies, json=burp0_json).text

How to use

As you want :)

  • python3 main.py "Hello World"

This will work because in script the input is sys.argv[1] ;)

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.