Ether Framework
Unified API docs for Ether modules
Loading...
Searching...
No Matches
dev.rafex.ether.ai.deepseek.chat.DeepSeekChatModel Class Reference

Chat model adapter for the DeepSeek API. More...

Inheritance diagram for dev.rafex.ether.ai.deepseek.chat.DeepSeekChatModel:
Collaboration diagram for dev.rafex.ether.ai.deepseek.chat.DeepSeekChatModel:

Public Member Functions

 DeepSeekChatModel (final DeepSeekConfig config)
 Creates a new model with a default HTTP client and JSON codec.
 DeepSeekChatModel (final DeepSeekConfig config, final HttpClient httpClient, final JsonCodec jsonCodec)
 Creates a new model with a custom HTTP client and JSON codec.
AiChatResponse generate (final AiChatRequest request) throws IOException, InterruptedException
 Sends a chat completion request to the DeepSeek API and returns the parsed response.

Detailed Description

Chat model adapter for the DeepSeek API.

Implements AiChatModel by sending HTTP requests to the DeepSeek chat completions endpoint and mapping JSON responses back to Ether AI domain objects.

Definition at line 58 of file DeepSeekChatModel.java.

Constructor & Destructor Documentation

◆ DeepSeekChatModel() [1/2]

dev.rafex.ether.ai.deepseek.chat.DeepSeekChatModel.DeepSeekChatModel ( final DeepSeekConfig config)

Creates a new model with a default HTTP client and JSON codec.

Parameters
configDeepSeek connection configuration

Definition at line 74 of file DeepSeekChatModel.java.

References dev.rafex.ether.json.JsonUtils.codec().

Here is the call graph for this function:

◆ DeepSeekChatModel() [2/2]

dev.rafex.ether.ai.deepseek.chat.DeepSeekChatModel.DeepSeekChatModel ( final DeepSeekConfig config,
final HttpClient httpClient,
final JsonCodec jsonCodec )

Creates a new model with a custom HTTP client and JSON codec.

Parameters
configDeepSeek connection configuration
httpClientpre-configured HTTP client to use for requests
jsonCodecJSON codec for serialization; falls back to the default codec when null

Definition at line 85 of file DeepSeekChatModel.java.

References dev.rafex.ether.json.JsonUtils.codec().

Here is the call graph for this function:

Member Function Documentation

◆ generate()

AiChatResponse dev.rafex.ether.ai.deepseek.chat.DeepSeekChatModel.generate ( final AiChatRequest request) throws IOException, InterruptedException

Sends a chat completion request to the DeepSeek API and returns the parsed response.

Parameters
requestthe chat request containing model, messages and generation parameters
Returns
the parsed response including the assistant message, model name and token usage
Exceptions
IOExceptionif an I/O error occurs during the HTTP call or response parsing
InterruptedExceptionif the current thread is interrupted while waiting for the HTTP response
AiHttpExceptionif the DeepSeek API returns a non-2xx HTTP status code

Implements dev.rafex.ether.ai.core.chat.AiChatModel.

Definition at line 101 of file DeepSeekChatModel.java.

References dev.rafex.ether.ai.core.message.AiMessageRole.fromWireValue().

Here is the call graph for this function:

The documentation for this class was generated from the following file: