chatgpt-java  by Grt1228

Java SDK for OpenAI APIs

Created 2 years ago
3,457 stars

Top 14.0% on SourcePulse

GitHubView on GitHub
Project Summary

This Java SDK provides a comprehensive client for interacting with OpenAI's official APIs, targeting developers who need to integrate advanced AI capabilities like GPT-3.5/4, DALL-E 3, and TTS into their Java applications. It offers support for streaming output, GPT plugins, and network connectivity, simplifying the process of leveraging OpenAI's models.

How It Works

The SDK utilizes OkHttpClient for network requests, allowing for extensive customization of clients, including proxy settings, timeouts, and interceptors. It supports both standard and streaming API responses through OpenAiClient and OpenAiStreamClient respectively. Key features include dynamic API key management, token calculation (via tiktoken-java), and robust error handling for API key issues.

Quick Start & Requirements

Highlighted Details

  • Supports streaming output via SSE and WebSocket.
  • Implements GPT plugin functionality and tool calls.
  • Includes features for DALL-E 3 image generation and text-to-speech (TTS).
  • Offers dynamic API key management and custom key retrieval strategies.
  • Provides token calculation utilities.

Maintenance & Community

The project is community-maintained. Further community interaction and support can be found via the linked WeChat public account (chatgpt-java).

Licensing & Compatibility

The project is licensed under the Apache License 2.0, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

The project is described as "unofficial" and community-maintained, implying potential for bugs or breaking changes. While it supports various OpenAI models, users should verify compatibility with the latest API versions.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Adam Wolff Adam Wolff(Claude Code Core; MTS at Anthropic), Samuel Colvin Samuel Colvin(Founder and Author of Pydantic), and
5 more.

anthropic-sdk-python by anthropics

0.5%
2k
Python SDK for Anthropic's REST API
Created 2 years ago
Updated 1 day ago
Feedback? Help us improve.