Skip to content

Commit

Permalink
No longer holding reference to options in the base clients
Browse files Browse the repository at this point in the history
  • Loading branch information
jpalvarezl committed Sep 30, 2024
1 parent 8f82cd1 commit bc04acd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
16 changes: 2 additions & 14 deletions sdk/openai/inference/src/clients/azure_openai_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ pub struct AzureOpenAIClient {

/// The pipeline for sending requests to the service.
pipeline: azure_core::Pipeline,

/// The options for the client.
#[allow(dead_code)]
options: AzureOpenAIClientOptions,
}

impl AzureOpenAIClient {
Expand Down Expand Up @@ -72,11 +68,7 @@ impl AzureOpenAIClient {

let pipeline = super::new_pipeline(per_call_policies, options.client_options.clone());

Ok(AzureOpenAIClient {
endpoint,
pipeline,
options,
})
Ok(AzureOpenAIClient { endpoint, pipeline })
}

/// Creates a new [`AzureOpenAIClient`] using a key credential
Expand Down Expand Up @@ -113,11 +105,7 @@ impl AzureOpenAIClient {

let pipeline = super::new_pipeline(per_call_policies, options.client_options.clone());

Ok(AzureOpenAIClient {
endpoint,
pipeline,
options,
})
Ok(AzureOpenAIClient { endpoint, pipeline })
}
}

Expand Down
8 changes: 1 addition & 7 deletions sdk/openai/inference/src/clients/openai_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ pub trait OpenAIClientMethods {
pub struct OpenAIClient {
base_url: Url,
pipeline: azure_core::Pipeline,
#[allow(dead_code)]
options: OpenAIClientOptions,
}

impl OpenAIClient {
Expand All @@ -46,11 +44,7 @@ impl OpenAIClient {

let pipeline = super::new_pipeline(vec![auth_policy], options.client_options.clone());

Ok(OpenAIClient {
base_url,
pipeline,
options,
})
Ok(OpenAIClient { base_url, pipeline })
}
}

Expand Down

0 comments on commit bc04acd

Please sign in to comment.