pub struct SyncCreateResponseBuilder { /* private fields */ }Expand description
Blocking wrapper for CreateResponseBuilder.
Implementations§
Source§impl SyncCreateResponseBuilder
impl SyncCreateResponseBuilder
Sourcepub fn message(self, role: Role, content: impl Into<MessageContent>) -> Self
pub fn message(self, role: Role, content: impl Into<MessageContent>) -> Self
Add a message.
Sourcepub fn user(self, content: impl Into<MessageContent>) -> Self
pub fn user(self, content: impl Into<MessageContent>) -> Self
Add a user message.
Sourcepub fn user_with_image(
self,
text: impl Into<String>,
image_url: impl Into<String>,
) -> Self
pub fn user_with_image( self, text: impl Into<String>, image_url: impl Into<String>, ) -> Self
Add a user message with image content.
Sourcepub fn tool_choice(self, choice: ToolChoice) -> Self
pub fn tool_choice(self, choice: ToolChoice) -> Self
Set tool choice.
Sourcepub fn temperature(self, temperature: f32) -> Self
pub fn temperature(self, temperature: f32) -> Self
Set temperature.
Sourcepub fn max_tokens(self, max_tokens: u32) -> Self
pub fn max_tokens(self, max_tokens: u32) -> Self
Set max tokens.
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
Override retry attempts for this request.
Sourcepub fn disable_retries(self) -> Self
pub fn disable_retries(self) -> Self
Disable retries for this request.
Sourcepub fn retry_backoff(self, initial: Duration, max: Duration) -> Self
pub fn retry_backoff(self, initial: Duration, max: Duration) -> Self
Override retry backoff for this request.
Sourcepub fn retry_jitter(self, factor: f64) -> Self
pub fn retry_jitter(self, factor: f64) -> Self
Override retry jitter for this request.
Sourcepub fn response_format(self, format: ResponseFormat) -> Self
pub fn response_format(self, format: ResponseFormat) -> Self
Set response format.
Sourcepub fn json_output(self) -> Self
pub fn json_output(self) -> Self
Request JSON output.
Sourcepub fn with_inline_citations(self) -> Self
pub fn with_inline_citations(self) -> Self
Include inline citations.
Sourcepub fn with_verbose_streaming(self) -> Self
pub fn with_verbose_streaming(self) -> Self
Include verbose streaming metadata.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyncCreateResponseBuilder
impl !RefUnwindSafe for SyncCreateResponseBuilder
impl Send for SyncCreateResponseBuilder
impl Sync for SyncCreateResponseBuilder
impl Unpin for SyncCreateResponseBuilder
impl UnsafeUnpin for SyncCreateResponseBuilder
impl !UnwindSafe for SyncCreateResponseBuilder
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