deepseek-go  by cohesion-org

Go SDK for Deepseek API

created 8 months ago
297 stars

Top 90.4% on sourcepulse

GitHubView on GitHub
Project Summary

Deepseek-Go is a Go client library for interacting with the Deepseek AI API, offering a type-safe interface for chat completions, streaming, and token usage. It also provides support for external providers like Azure, OpenRouter, and local Ollama instances, making it a versatile tool for developers integrating AI capabilities into Go applications.

How It Works

The library leverages Go's strong typing to provide a clean API for Deepseek's models, including deepseek-chat and deepseek-reasoner. It supports streaming responses for real-time interaction and includes features for managing conversation history. The modular design allows for easy extension and integration with other services, including custom providers that adhere to a similar API structure.

Quick Start & Requirements

  • Install via: go get github.com/cohesion-org/deepseek-go
  • Requires Go 1.24.0 or later.
  • A Deepseek API key is necessary for direct Deepseek API usage.
  • Official examples are available in the /examples directory.

Highlighted Details

  • Supports chat completions with streaming.
  • Integrates with external providers: Azure, OpenRouter, and local Ollama.
  • Includes features for FIM (Fill In the Middle) and Chat Prefix Completion (Beta).
  • Offers JSON mode for structured data extraction.
  • Provides utilities for token estimation and account balance retrieval.

Maintenance & Community

The project is open for contributions via issues and PRs. Community engagement is encouraged for improvements and issue reporting.

Licensing & Compatibility

Licensed under the MIT License, permitting both personal and commercial use.

Limitations & Caveats

Ollama support is experimental due to potential deviations from OpenAI API policies. The FIM and Chat Prefix Completion features are marked as Beta. The deepseek-reasoner model has specific usage conditions noted in issue #8.

Health Check
Last commit

1 week ago

Responsiveness

1 day

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

Explore Similar Projects

Starred by Peter Norvig Peter Norvig(Author of Artificial Intelligence: A Modern Approach; Research Director at Google), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
2 more.

aisuite by andrewyng

0.2%
12k
Unified interface for multiple generative AI providers
created 1 year ago
updated 4 days ago
Feedback? Help us improve.