Class DeepSeekCompletionRequest
java.lang.Object
de.entwicklertraining.api.base.ApiRequest<DeepSeekCompletionResponse>
de.entwicklertraining.deepseek4j.DeepSeekRequest<DeepSeekCompletionResponse>
de.entwicklertraining.deepseek4j.chat.completion.DeepSeekCompletionRequest
Represents a request to the DeepSeek Chat Completion API.
Supports all documented parameters:
- messages (required)
- model (required)
- frequency_penalty
- max_tokens
- presence_penalty
- response_format
- stop
- stream
- stream_options
- temperature
- top_p
- tools
- tool_choice
- logprobs
- top_logprobs
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classRepresents the options for streaming responses. -
Method Summary
Modifier and TypeMethodDescriptionbuilder(DeepSeekClient client) createResponse(String responseBody) getBody()Returns the request body as a String (often JSON).Returns the HTTP method (e.g.logprobs()List<org.json.JSONObject> messages()model()stop()stream()org.json.JSONObjecttoJson()Constructs the JSON body with all relevant fields.tools()topP()Methods inherited from class de.entwicklertraining.deepseek4j.DeepSeekRequest
createResponse, getBodyBytes, getContentType, isBinaryResponseMethods inherited from class de.entwicklertraining.api.base.ApiRequest
getAdditionalHeaders, getCaptureOnError, getCaptureOnSuccess, getIsCanceledSupplier, getMaxExecutionTimeInSeconds, hasCaptureOnError, hasCaptureOnSuccess, setHeader
-
Method Details
-
model
-
messages
-
frequencyPenalty
-
maxTokens
-
presencePenalty
-
responseFormat
-
stop
-
stream
-
streamOptions
-
temperature
-
topP
-
tools
-
toolChoice
-
logprobs
-
topLogprobs
-
getRelativeUrl
- Specified by:
getRelativeUrlin classde.entwicklertraining.api.base.ApiRequest<DeepSeekCompletionResponse>
-
getHttpMethod
Description copied from class:DeepSeekRequestReturns the HTTP method (e.g. "POST" or "GET").- Specified by:
getHttpMethodin classDeepSeekRequest<DeepSeekCompletionResponse>
-
getBody
Description copied from class:DeepSeekRequestReturns the request body as a String (often JSON). May be null if GET.- Specified by:
getBodyin classDeepSeekRequest<DeepSeekCompletionResponse>
-
toJson
public org.json.JSONObject toJson()Constructs the JSON body with all relevant fields. -
createResponse
- Specified by:
createResponsein classDeepSeekRequest<DeepSeekCompletionResponse>
-
builder
-