skillfed

deepseek-integration

DeepSeek Integration provides expert guidance for connecting to DeepSeek's chat API using reqwest with optimized connection pooling, Bearer token authentication, and configurable timeouts. Handle both standard JSON responses and Server-Sent Events streaming, with built-in retry logic and exponential backoff for resilience.

DeepSeek Integration helps you connect to DeepSeek API using reqwest with connection pooling and streaming support.

AI-generated summary based on this skill's SKILL.md

4 3 MIT updated by cacr92

Install

cacr92/WeReply/deepseek-integration · repository language: Python

CLI (skillfed)coming soon
git clone https://github.com/cacr92/WeReply
cp -r WeReply/.claude/skills/deepseek-integration ~/.claude/skills/deepseek-integration

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I integrate DeepSeek API in Rust?

deepseek-integration guides you through connecting to DeepSeek's chat API using the reqwest HTTP client. Set up a reqwest::Client with connection pooling for efficient resource management, configure Bearer token authentication with your API key, and establish appropriate timeout settings. The skill covers both standard JSON responses and streaming modes to match your application's needs.

How can deepseek-integration handle streaming responses?

deepseek-integration implements Server-Sent Events (SSE) parsing to process streaming responses from DeepSeek. The skill shows how to parse incoming chunks, handle event boundaries, and integrate streaming with your reqwest client configuration. This enables real-time AI responses without waiting for complete message generation.

What retry strategy with exponential backoff does deepseek-integration provide?

deepseek-integration builds resilient API communication with configurable retry logic and exponential backoff. Handle transient failures like 429 rate limits, 503 service unavailable, and timeout errors. The skill demonstrates how to implement backoff timing, track retry attempts, and gracefully degrade when retries are exhausted.

How does deepseek-integration manage API key security?

deepseek-integration secures your DeepSeek API credentials through Bearer token authentication and keychain integration. The skill covers best practices for storing API keys safely, validating authentication tokens before requests, and avoiding credential exposure in logs or error messages.

Can deepseek-integration generate AI-powered reply suggestions?

deepseek-integration enables AI-powered reply suggestions by configuring DeepSeek model parameters like temperature and token limits, crafting effective system prompts, and handling errors gracefully. The skill includes JSON serialization for chat messages and demonstrates batch processing multiple API requests efficiently.

What connection pooling and timeout settings does deepseek-integration offer?

deepseek-integration optimizes reqwest client configuration with connection pooling to reuse TCP connections across multiple API calls. Configure request timeouts, connection timeouts, and pool size based on your workload. The skill also covers mock HTTP client testing for validating your DeepSeek integration without live API calls.

SKILL.md

rendered from the published skill — quoted content, verbatim

DeepSeek Integration Skill

Expert guidance for integrating DeepSeek API with reqwest HTTP client, streaming responses, and error handling.

Overview

WeReply uses DeepSeek API to generate reply suggestions: - HTTP Client: reqwest with connection pooling - API Endpoint: https://api.deepseek.com/v1/chat/completions - Authentication: API key via Bearer token - Response Format: JSON (non-streaming) or Server-Sent Events (streaming) - Configuration: API key stored in system keychain

HTTP Client Configuration

Reqwest Client Setup

```rust use reqwest::{Client, ClientBuilder}; use std::time::Duration; use std::sync::Arc;

pub struct DeepSeekClient { client: Arc<Client>, api_key: String, api_endpoint: String, }

impl DeepSeekClient { pub fn new(api_key: String) -> anyhow::Result<Self> { let client = ClientBuilder::new() .pool_max_idle_per_host(10) // 连接池最大空闲连接数

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 2 files
.claude/skills/deepseek-integration/SKILL.md
.claude/skills/deepseek-integration/skill.json

Related skills

Tags

llm-integration http-client-pooling streaming-events retry-backoff api-security error-classification batch-processing response-parsing timeout-config mock-testing