Your Guide to Using the AI Chat CLI

Dec 3, 2021 | Educational

Welcome to your ultimate guide on how to set up and run the AI Chat CLI, a command-line interface chatbot that lets you interact with various AI bots, including GPT-4. This tutorial will walk you through the steps to get started, including some troubleshooting tips to ensure that your chatting experience is smooth and enjoyable.

What is AI Chat CLI?

The AI Chat CLI is designed to provide interactive conversations with different bots directly from your terminal. It’s like having a chat with your computer in a friendly coffee shop setting, where you can select which bot to converse with and dive into discussions on topics of your interest.

Features

  • Choose between different bots.
  • Input messages via command-line arguments or interactively.
  • Export conversations to a .txt file for future reference.
  • Insert clipboard content for multi-line messages.
  • Delete messages for privacy.
  • Daily updated tokens for continuous functionality.

Prerequisites

Ensure you have the following before you begin:

  • Python 3.7 or higher installed on your system.

Getting Started

Installation Steps

Follow these simple steps to get the AI Chat CLI up and running:

  1. Clone or download the CLI app repository to your local machine.
  2. Open a command-line interface (e.g., Command Prompt, Terminal) and navigate to the directory where you saved the GPT CLI files.
  3. Install the required dependencies by running the following command:
  4. pip install -r requirements.txt
  5. Run the CLI app:
  6. cd aichat
    python chatcli.py
  7. OR download it using pip:
  8. pip install aichat-cli --upgrade

How to Add pip Package to PATH

  1. Open the command prompt.
  2. Type pip show aichat-cli and press Enter to find the package location.
  3. Copy the path of the package.
  4. Open the Start menu and search for “Environment Variables.”
  5. Click on “Edit the system environment variables.”
  6. Click on “Environment Variables” button.
  7. Under “System Variables,” scroll down and find “Path” and click on “Edit.”
  8. Click on “New” and paste the path of the package that you copied earlier.
  9. Click on “OK” to save changes.

Generating Tokens

Tokens are crucial for your bot’s operation. Here’s how to generate them:

Poe Token

  1. Log into Poe.
  2. Open your browser’s developer tools (Devtools) and look for the value of the p-b cookie.
  3. Save the token by creating poe_token.txt in the aichat/tokens directory.

Bard Token

  1. Log into Bard.
  2. Open your browser’s developer tools and find the __Secure-1PSID cookie value.
  3. Save the token by creating bard_token.txt in the aichat/tokens directory. Warning: Be careful using Bard tokens; they are Google account tokens.

Bing Token

Not required.

Usage

The CLI app supports the following command-line arguments:

  • -b or --bot: Choose the bot for the conversation (e.g., python chatcli.py -b chatgpt).
  • -m or --message: Input a message for the chatbot (e.g., python chatcli.py -b sage -m "Hello, how are you?").

If you don’t provide any command-line arguments, the app prompts you to choose a bot and enter a message interactively.

Once the conversation starts, you can continue chatting by typing messages or selecting options from the menu. Options include changing the bot or exporting the conversation to a .txt file.

Troubleshooting

If you encounter issues while using the AI Chat CLI, here are a few troubleshooting tips:

  • Ensure that you have Python 3.7 or higher installed.
  • Double-check the installation of dependencies.
  • If the token.txt file is missing or empty, the app will auto-generate a new token using the provided script.
  • Make sure to keep your tokens updated to prevent access issues.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Final Thoughts

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