gptcli  by evilpan

CLI tool for interacting with OpenAI-compatible chat models

created 2 years ago
281 stars

Top 93.7% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a command-line interface for interacting with OpenAI-compatible language models, targeting developers and power users who prefer terminal-based workflows. It offers a streamlined way to access advanced AI models like GPT-3.5, GPT-4, and Gemini, enabling efficient querying and conversation management directly from the command line.

How It Works

The client is a single Python script that interfaces with OpenAI-compatible APIs. It supports session-based conversations, allowing users to maintain context across multiple turns. Key features include stream output with optional Markdown rendering, proxy support for various protocols (HTTP, HTTPS, SOCKS4A/SOCKS5), and the ability to save/load conversations to/from Markdown or JSON files.

Quick Start & Requirements

  • Install via pip3 install -U -r requirements.txt.
  • Requires an OpenAI API key, configurable via conf/config.json or the OPENAI_API_KEY environment variable.
  • Supports OpenAI-Compatible APIs, including custom base_url.
  • Docker image available for easier deployment.

Highlighted Details

  • Single Python script for simplicity.
  • Supports any OpenAI-Compatible API and models.
  • Markdown support with code syntax highlighting.
  • Session management with context control (0, 1, or 2 levels).
  • Real-time token usage and billing details (OpenAI only).

Maintenance & Community

The project is maintained by evilpan. Links to community resources like Discord or Slack are not provided in the README.

Licensing & Compatibility

The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

This client exclusively supports text-based models and does not include features like RAG, image generation, or function calling. For more advanced functionalities, users are directed to other projects.

Health Check
Last commit

3 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.