How to Get Started with TypeGPT: Your AI Assistant at Your Fingertips

May 26, 2021 | Educational

TypeGPT is an innovative Python application that lets you invoke multiple AI models right from any text field across your operating system! Picture it as having a personal assistant who’s always on standby—be it in your chat app, document, or code editor. With TypeGPT, communicating with ChatGPT, Google Gemini, Claude, or Llama3 has never been easier, making sure you’re always just a couple of keystrokes away from the power of AI.

Features of TypeGPT

  • Global Accessibility: Use AI models from any text input field throughout your system.
  • Multiple AI Models: Support for notable AI systems including ChatGPT, Google Gemini, Claude, and Llama3.
  • Keyboard Shortcuts: Simple keyboard shortcuts to easily interact with AI models.
  • Clipboard Integration: Efficiently utilize the clipboard for larger text inputs and image pasting.
  • Screenshot Capability: Capture and manage screenshots within your queries.

Prerequisites for Installation

Before diving into the setup, ensure you have the following essentials:

  • Python 3.x
  • pynput package
  • requests package
  • pyperclip package
  • google.generativeai package
  • anthropic package
  • Pillow (PIL) package

You will also need API keys for the respective AI services you intend to use. Here’s where you can obtain them:

Installation Steps

Ready to install? Follow these steps:

  1. Open your terminal/shell and clone the repository:
  2. git clone https://github.com/olyai/TypeGPT.git
  3. Navigate to the project directory:
  4. cd TypeGPT
  5. Give execute permission and run the install script:
  6. chmod +x scripts/install.sh  chmod +x scripts/run.sh  
    .scripts/install.sh

Running TypeGPT

You can run TypeGPT using the provided executable that allows the program to operate in the background by executing:

.run.sh

To manage the program, use:

ps aux | grep TypeGPT.py

If you need to stop the program, grab the PID (a unique identifier) associated with the process and type:

kill -9 [PID]

For instance, if your PID is 12812, you would type:

kill -9 12812

Usage Instructions

Once up and running, use these keyboard shortcuts in any text field (such as search bars, Google Docs, or code editors) to interact with TypeGPT:

  • ask: Type this command with your prompt and hit Cmd+Shift+Enter to send it. You can paste content using Cmd+V.
  • see: Capture a screenshot to include with your next query.
  • stop: Stops the program from listening to new commands. Use this if you decide to change your mind about a prompt.
  • chatgpt: Switch to the ChatGPT model.
  • gemini: Switch to the Google Gemini model.
  • claude: Switch to the Claude model.
  • llama3: Switch to the Llama3 model.
  • check: Check which model is currently active.
  • quit: Exit the program. Use Shift + Cmd + Enter to send your text when in listening mode.

Make sure to set your API keys by editing the keys.txt file in the project directory with:

OPENAI_API_KEY=your-openai-key-here
GEMINI_API_KEY=your-gemini-key-here
ANTHROPIC_API_KEY=your-anthropic-key-here

Customizing Your TypeGPT Experience

To tailor the responses and behavior of your AI, modify the system_prompt.txt file according to your needs, and for changing model versions, adjust the api_calls.py file. Currently, the default versions are set as follows:

  • ChatGPT: gpt-4-turbo
  • Gemini: gemini-1.0-pro-vision-latest
  • Claude: claude-3-5-sonnet-20240620
  • Llama3: Uses the local Ollama instance

Troubleshooting

If you encounter issues while running TypeGPT, consider these troubleshooting ideas:

  • Ensure all prerequisites are installed correctly.
  • Check if the API keys are valid and properly set in the keys.txt file.
  • Verify that Ollama is running locally if you’re using the Llama3 model.
  • For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Future Plans and Contribution

The developers behind TypeGPT are constantly looking to add support for more AI models and to enhance the user interface. Interested in contributing? You’re welcome to fork the repository and submit pull requests with your modifications!

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox