Skip to content

Commit

Permalink
Various visibility restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
jpalvarezl committed Sep 19, 2024
1 parent 8651661 commit f3795a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct ChatCompletionsClient {
}

impl ChatCompletionsClient {
pub(crate) fn new(base_client: Box<dyn BaseOpenAIClientMethods>) -> Self {
pub(super) fn new(base_client: Box<dyn BaseOpenAIClientMethods>) -> Self {
Self { base_client }
}
}
Expand Down
13 changes: 4 additions & 9 deletions sdk/openai/inference/src/clients/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub use azure_openai_client::{AzureOpenAIClient, AzureOpenAIClientMethods};
pub use chat_completions_client::{ChatCompletionsClient, ChatCompletionsClientMethods};
pub use openai_client::{OpenAIClient, OpenAIClientMethods};

pub(crate) trait BaseOpenAIClientMethods {
trait BaseOpenAIClientMethods {
fn base_url(&self, deployment_name: Option<&str>) -> azure_core::Result<azure_core::Url>;

fn pipeline(&self) -> &azure_core::Pipeline;
Expand All @@ -18,17 +18,12 @@ fn new_pipeline(
per_call_policies: Vec<Arc<dyn azure_core::Policy>>,
options: azure_core::ClientOptions,
) -> azure_core::Pipeline {
let crate_name = option_env!("CARGO_PKG_NAME");
let crate_version = option_env!("CARGO_PKG_VERSION");
// should I be using per_call_policies here too or are they used by default on retries too?
let per_retry_policies = Vec::new();

azure_core::Pipeline::new(
crate_name,
crate_version,
option_env!("CARGO_PKG_NAME"),
option_env!("CARGO_PKG_VERSION"),
options,
per_call_policies,
per_retry_policies,
Vec::new(),
)
}

Expand Down

0 comments on commit f3795a1

Please sign in to comment.