pub struct PromptRenderRequest {Show 13 fields
pub variables: HashMap<String, Value>,
pub max_tokens: Option<i32>,
pub temperature: Option<f32>,
pub presence_penalty: Option<f32>,
pub frequency_penalty: Option<f32>,
pub top_p: Option<f32>,
pub stop: Option<Vec<String>>,
pub n: Option<i32>,
pub logprobs: Option<bool>,
pub echo: Option<bool>,
pub best_of: Option<i32>,
pub logit_bias: Option<HashMap<String, i32>>,
pub user: Option<String>,
}Expand description
Request to render a prompt template with variable substitution.
This endpoint renders a prompt template by substituting variables and applying hyperparameters, returning the fully rendered prompt configuration without executing it.
Fields§
§variables: HashMap<String, Value>Variables to substitute in the prompt template
max_tokens: Option<i32>Maximum number of tokens to generate
temperature: Option<f32>Sampling temperature (0-2)
presence_penalty: Option<f32>Presence penalty (-2 to 2)
frequency_penalty: Option<f32>Frequency penalty (-2 to 2)
top_p: Option<f32>Nucleus sampling parameter (0-1)
stop: Option<Vec<String>>Stop sequences
n: Option<i32>Number of completions to generate
logprobs: Option<bool>Include log probabilities
echo: Option<bool>Echo back the prompt
best_of: Option<i32>Generate best_of completions server-side
logit_bias: Option<HashMap<String, i32>>Logit bias map
user: Option<String>User identifier
Trait Implementations§
Source§impl Clone for PromptRenderRequest
impl Clone for PromptRenderRequest
Source§fn clone(&self) -> PromptRenderRequest
fn clone(&self) -> PromptRenderRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PromptRenderRequest
impl Debug for PromptRenderRequest
Source§impl<'de> Deserialize<'de> for PromptRenderRequest
impl<'de> Deserialize<'de> for PromptRenderRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PromptRenderRequest
impl RefUnwindSafe for PromptRenderRequest
impl Send for PromptRenderRequest
impl Sync for PromptRenderRequest
impl Unpin for PromptRenderRequest
impl UnwindSafe for PromptRenderRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more