Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added license header to source files
Browse files Browse the repository at this point in the history
jpalvarezl committed Sep 30, 2024
1 parent 68562ac commit f00dd19
Showing 21 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdk/openai/inference/examples/azure_chat_completions.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use azure_openai_inference::{
clients::{AzureOpenAIClient, AzureOpenAIClientMethods, ChatCompletionsClientMethods},
AzureOpenAIClientOptions, AzureServiceVersion, CreateChatCompletionsRequest,
2 changes: 2 additions & 0 deletions sdk/openai/inference/examples/azure_chat_completions_aad.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use std::sync::Arc;

use azure_identity::DefaultAzureCredentialBuilder;
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use azure_openai_inference::{
clients::{AzureOpenAIClient, AzureOpenAIClientMethods, ChatCompletionsClientMethods},
AzureOpenAIClientOptions, AzureServiceVersion, CreateChatCompletionsRequest,
2 changes: 2 additions & 0 deletions sdk/openai/inference/examples/chat_completions.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use azure_openai_inference::{
clients::{ChatCompletionsClientMethods, OpenAIClient, OpenAIClientMethods},
CreateChatCompletionsRequest,
2 changes: 2 additions & 0 deletions sdk/openai/inference/examples/chat_completions_stream.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use azure_openai_inference::{
clients::{ChatCompletionsClientMethods, OpenAIClient, OpenAIClientMethods},
CreateChatCompletionsRequest,
2 changes: 2 additions & 0 deletions sdk/openai/inference/src/clients/azure_openai_client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use std::sync::Arc;

use crate::credentials::{AzureKeyCredential, DEFAULT_SCOPE};
2 changes: 2 additions & 0 deletions sdk/openai/inference/src/clients/chat_completions_client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use super::{new_json_request, BaseOpenAIClientMethods};
use crate::{
helpers::streaming::{string_chunks, EventStreamer},
2 changes: 2 additions & 0 deletions sdk/openai/inference/src/clients/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
mod azure_openai_client;
mod chat_completions_client;
mod openai_client;
2 changes: 2 additions & 0 deletions sdk/openai/inference/src/clients/openai_client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use std::sync::Arc;

use azure_core::{Policy, Result, Url};
2 changes: 2 additions & 0 deletions sdk/openai/inference/src/credentials/azure_key_credential.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use async_trait::async_trait;
use std::sync::Arc;

2 changes: 2 additions & 0 deletions sdk/openai/inference/src/credentials/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
mod azure_key_credential;
mod openai_key_credential;

2 changes: 2 additions & 0 deletions sdk/openai/inference/src/credentials/openai_key_credential.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use async_trait::async_trait;
use std::sync::Arc;

2 changes: 2 additions & 0 deletions sdk/openai/inference/src/helpers/mod.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
pub(crate) mod streaming;
2 changes: 2 additions & 0 deletions sdk/openai/inference/src/helpers/streaming.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use azure_core::{Error, Result};
use futures::{Stream, StreamExt};

2 changes: 2 additions & 0 deletions sdk/openai/inference/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
pub mod clients;
mod credentials;
mod helpers;
2 changes: 2 additions & 0 deletions sdk/openai/inference/src/models/chat_completions.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
pub mod request {

use serde::Serialize;
2 changes: 2 additions & 0 deletions sdk/openai/inference/src/models/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
mod chat_completions;

pub use chat_completions::*;
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use azure_core::ClientOptions;

use crate::AzureServiceVersion;
2 changes: 2 additions & 0 deletions sdk/openai/inference/src/options/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
mod azure_openai_client_options;
mod openai_client_options;
mod service_version;
2 changes: 2 additions & 0 deletions sdk/openai/inference/src/options/openai_client_options.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use azure_core::ClientOptions;

/// Options to be passed to [`OpenAIClient`](crate::clients::OpenAIClient).
2 changes: 2 additions & 0 deletions sdk/openai/inference/src/options/service_version.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
use async_trait::async_trait;
use std::sync::Arc;

0 comments on commit f00dd19

Please sign in to comment.