#[non_exhaustive]pub struct AzureOptions {
pub chat: AzureChat,
}Expand description
Azure OpenAI’s request options, sent on Chat Completions.
The Chat field setters here write the same field as
chat, which replaces every such field set before it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.chat: AzureChatSent on Chat Completions only.
Implementations§
Source§impl AzureOptions
impl AzureOptions
Sourcepub fn chat(self, chat: ChatOptions) -> Self
pub fn chat(self, chat: ChatOptions) -> Self
Send OpenAI’s Chat fields chat.
Sourcepub fn data_source(self, source: Value) -> Self
pub fn data_source(self, source: Value) -> Self
Answer from source too, such as an Azure AI Search index.
Sourcepub fn logprobs(self, logprobs: bool) -> Self
pub fn logprobs(self, logprobs: bool) -> Self
Whether the reply carries log probabilities, as
ChatOptions::logprobs.
Sourcepub fn top_logprobs(self, count: u8) -> Self
pub fn top_logprobs(self, count: u8) -> Self
Report the count most likely tokens per position, as
ChatOptions::top_logprobs.
Sourcepub fn frequency_penalty(self, penalty: f64) -> Self
pub fn frequency_penalty(self, penalty: f64) -> Self
Set the frequency penalty, as ChatOptions::frequency_penalty.
Sourcepub fn presence_penalty(self, penalty: f64) -> Self
pub fn presence_penalty(self, penalty: f64) -> Self
Set the presence penalty, as ChatOptions::presence_penalty.
Sourcepub fn logit_bias(self, token: u32, bias: i32) -> Self
pub fn logit_bias(self, token: u32, bias: i32) -> Self
Bias token id token by bias, as ChatOptions::logit_bias.
Sourcepub fn prediction(self, content: impl Into<String>) -> Self
pub fn prediction(self, content: impl Into<String>) -> Self
Predict the output as content, as ChatOptions::prediction.
Trait Implementations§
Source§impl Clone for AzureOptions
impl Clone for AzureOptions
Source§impl Debug for AzureOptions
impl Debug for AzureOptions
Source§impl Default for AzureOptions
impl Default for AzureOptions
Source§impl ExtensionOptions for AzureOptions
impl ExtensionOptions for AzureOptions
Source§type Ext = AzureExt
type Ext = AzureExt
The provider these options are for: the entry
ProviderOptions::set stores them under. A type that serves as the
Options of several providers names one of them here, and is stored
for the others with ProviderOptions::with.Source§fn unsupported(
&self,
target: &dyn ReplayTarget,
request: &CompletionRequest,
) -> Vec<(&'static str, String)>
fn unsupported( &self, target: &dyn ReplayTarget, request: &CompletionRequest, ) -> Vec<(&'static str, String)>
The fields
target cannot send for request, each a top-level body
key with the reason. Each one set is reported through the request’s
OnUnsupported policy under the
name "<provider>.<section>.<field>". It must not call
options::param, which reads
it. By default every field is sent.Source§impl PartialEq for AzureOptions
impl PartialEq for AzureOptions
Source§impl Serialize for AzureOptions
impl Serialize for AzureOptions
impl StructuralPartialEq for AzureOptions
Auto Trait Implementations§
impl Freeze for AzureOptions
impl RefUnwindSafe for AzureOptions
impl Send for AzureOptions
impl Sync for AzureOptions
impl Unpin for AzureOptions
impl UnsafeUnpin for AzureOptions
impl UnwindSafe for AzureOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.