Skip to content

Commit

Permalink
Fixed tests in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jpalvarezl committed Sep 30, 2024
1 parent 611f716 commit 8f82cd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions sdk/openai/inference/src/clients/azure_openai_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ impl AzureOpenAIClient {
/// ```no_run
/// use azure_openai_inference::clients::{AzureOpenAIClient, AzureOpenAIClientMethods};
/// use azure_identity::DefaultAzureCredentialBuilder;
/// use std::sync::Arc;
///
/// let endpoint = std::env::var("AZURE_OPENAI_ENDPOINT").expect("Set AZURE_OPENAI_ENDPOINT environment variable");
/// let client = AzureOpenAIClient::new(
/// endpoint,
/// Arc::new(DefaultAzureCredentialBuilder::new().build().unwrap()),
/// DefaultAzureCredentialBuilder::new().build().unwrap(),
/// None,
/// ).unwrap();
/// ```
Expand Down
10 changes: 5 additions & 5 deletions sdk/openai/inference/src/models/chat_completions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub mod request {
/// # Example
///
/// ```rust
/// let request = azure_openai_inference::request::CreateChatCompletionsRequest::with_user_message(
/// let request = azure_openai_inference::CreateChatCompletionsRequest::with_user_message(
/// "gpt-3.5-turbo-1106",
/// "Why couldn't the eagles take Frodo directly to mount doom?");
/// ```
Expand All @@ -81,7 +81,7 @@ pub mod request {
/// # Example
///
/// ```rust
/// let request = azure_openai_inference::request::CreateChatCompletionsRequest::with_user_message_and_stream(
/// let request = azure_openai_inference::CreateChatCompletionsRequest::with_user_message_and_stream(
/// "gpt-3.5-turbo-1106",
/// "Why couldn't the eagles take Frodo directly to Mount Doom?");
/// ```
Expand All @@ -101,11 +101,11 @@ pub mod request {
///
/// # Example
/// ```rust
/// let request = azure_openai_inference::request::CreateChatCompletionsRequest::with_messages(
/// let request = azure_openai_inference::CreateChatCompletionsRequest::with_messages(
/// "gpt-3.5-turbo-1106",
/// vec![
/// azure_openai_inference::request::ChatCompletionRequestMessage::with_system_role("You are a good math tutor who explains things briefly."),
/// azure_openai_inference::request::ChatCompletionRequestMessage::with_user_role("What is the value of 'x' in the equation: '2x + 3 = 11'?"),
/// azure_openai_inference::ChatCompletionRequestMessage::with_system_role("You are a good math tutor who explains things briefly."),
/// azure_openai_inference::ChatCompletionRequestMessage::with_user_role("What is the value of 'x' in the equation: '2x + 3 = 11'?"),
/// ]);
pub fn with_messages(
model: impl Into<String>,
Expand Down

0 comments on commit 8f82cd1

Please sign in to comment.