pub struct FIMCompletionRequestBuilder { /* private fields */ }Expand description
Builder for FIMCompletionRequest.
Implementations§
Source§impl FIMCompletionRequestBuilder
impl FIMCompletionRequestBuilder
pub fn client<VALUE: Into<DeepSeekClient>>(self, value: VALUE) -> Self
Sourcepub fn model<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn model<VALUE: Into<String>>(self, value: VALUE) -> Self
Possible values: [deepseek-v4-pro]
ID of the model to use.
Sourcepub fn prompt<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn prompt<VALUE: Into<String>>(self, value: VALUE) -> Self
The prompt to generate completions for.
Sourcepub fn echo<VALUE: Into<bool>>(self, value: VALUE) -> Self
pub fn echo<VALUE: Into<bool>>(self, value: VALUE) -> Self
Echo back the prompt in addition to the completion
Sourcepub fn logprobs<VALUE: Into<u32>>(self, value: VALUE) -> Self
pub fn logprobs<VALUE: Into<u32>>(self, value: VALUE) -> Self
Possible values: <= 20
Include the log probabilities on the logprobs most likely output tokens,
as well the chosen tokens. For example, if logprobs is 20, the API will return a list of the 20 most likely tokens.
The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response.
The maximum value for logprobs is 20.
Sourcepub fn max_tokens<VALUE: Into<u32>>(self, value: VALUE) -> Self
pub fn max_tokens<VALUE: Into<u32>>(self, value: VALUE) -> Self
The maximum number of tokens that can be generated in the completion.
Sourcepub fn stop<VALUE: Into<Stop>>(self, value: VALUE) -> Self
pub fn stop<VALUE: Into<Stop>>(self, value: VALUE) -> Self
Up to 16 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
Sourcepub fn stream<VALUE: Into<bool>>(self, value: VALUE) -> Self
pub fn stream<VALUE: Into<bool>>(self, value: VALUE) -> Self
Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a · message. Example Python code.
Sourcepub fn stream_options<VALUE: Into<StreamOptions>>(self, value: VALUE) -> Self
pub fn stream_options<VALUE: Into<StreamOptions>>(self, value: VALUE) -> Self
Options for streaming response. Only set this when you set stream: true.
Sourcepub fn suffix<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn suffix<VALUE: Into<String>>(self, value: VALUE) -> Self
The suffix that comes after a completion of inserted text.
Sourcepub fn temperature<VALUE: Into<f64>>(self, value: VALUE) -> Self
pub fn temperature<VALUE: Into<f64>>(self, value: VALUE) -> Self
Possible values: <= 2
Default value: 1
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,
while lower values like 0.2 will make it more focused and deterministic.
We generally recommend altering this or top_p but not both.
Sourcepub fn top_p<VALUE: Into<f64>>(self, value: VALUE) -> Self
pub fn top_p<VALUE: Into<f64>>(self, value: VALUE) -> Self
Possible values: <= 1
Default value: 1
An alternative to sampling with temperature, called nucleus sampling,
where the model considers the results of the tokens with top_p probability mass.
So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or temperature but not both.