deepseek_api library

Classes

ChatChoice
Represents a choice within a chat completion response.
ChatCompletionRequest
Represents a request to the chat completion API.
ChatCompletionResponse
Represents a response from the chat completion API.
ChatMessage
Represents a chat message in the conversation.
DeepSeekAPI
DeepSeekAPI provides methods to interact with the DeepSeek API.
ModelData
Represents metadata about a specific model.
ModelsListResponse
Represents the response containing a list of available models.
Usage
Represents token usage statistics.

Exceptions / Errors

ApiException
Base class for API exceptions.
BadRequestException
Exception thrown when the API returns a bad request error.
InsufficientBalanceException
Exception thrown when the API returns an insufficient balance error.
NetworkException
Exception thrown when a network error occurs.
RateLimitException
Exception thrown when the API returns a rate limit error.
ServerException
Exception thrown when the API returns a server error.
UnauthorizedException
Exception thrown when the API returns an unauthorized error.