Skip to content

OpenAI Chat Completion right in your keyboard on iOS

License

Notifications You must be signed in to change notification settings

GalvinGao/gptkeyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI Chat Completion in Keyboard using Pythonista

RPReplay_Final1678149883.MP4

Prerequisites

  1. Get Pythonista on your iOS device

    Pythonista is a complete scripting environment for Python, running directly on your iPad or iPhone. It includes support for both Python 3.6 and 2.7, so you can use all the language improvements in Python 3, while still having 2.7 available for backwards compatibility.

    In true Python fashion, batteries are included – from popular third-party modules like requests, numpy, matplotlib, and many more, to modules that are tailor-made for iOS. You can write scripts that access sensor and location data, your photo library, contacts, reminders, the clipboard, and much more.

    You can also use Pythonista to build interactive multi-touch experiences, custom user interfaces, animations, and 2D games.

    Apart from learning and practicing Python, you can also use Pythonista to automate parts of iOS with app extensions, e.g. to invoke scripts directly from the standard share sheet in almost any app.

  2. Install StaSh

  3. Install sseclient-py by launching StaSh shell using launch_stash.py and then execute pip install sseclient-py

  4. Put the corresponding files into Pythonista documents

  5. Replace OPENAI_TOKEN in chat_cmpl.py with your OpenAI token

  6. Add chat_cmpl.py to your Keyboards in Pythonista by going to Settings -> Pythonista Keyboard -> Add -> Choose chat_cmpl.py as the script

  7. Go to iOS Settings -> General -> Keyboard -> Keyboards -> Add New Keyboard -> Pythonista Keyboard and enable Full Access

  8. Now you can use the keyboard to chat with OpenAI anywhere in iOS!

About

OpenAI Chat Completion right in your keyboard on iOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages