Skip to content

Commit 4496ce2

Browse files
authored
fix: cargo fmt and compiler warnings fixes (64bit#208)
* cargo fmt * fix imports
1 parent 12436b3 commit 4496ce2

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

async-openai/src/audio.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ use crate::{
55
error::OpenAIError,
66
types::{
77
CreateSpeechRequest, CreateSpeechResponse, CreateTranscriptionRequest,
8-
CreateTranscriptionResponseJson, CreateTranscriptionResponseVerboseJson, CreateTranslationRequest, CreateTranslationResponse,
8+
CreateTranscriptionResponseJson, CreateTranscriptionResponseVerboseJson,
9+
CreateTranslationRequest, CreateTranslationResponse,
910
},
1011
Client,
1112
};

examples/audio-transcribe/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use async_openai::{
22
types::{AudioResponseFormat, CreateTranscriptionRequestArgs, TimestampGranularity},
3-
Client
3+
Client,
44
};
55
use std::error::Error;
66

@@ -36,7 +36,10 @@ async fn transcribe_verbose_json() -> Result<(), Box<dyn Error>> {
3636
)
3737
.model("whisper-1")
3838
.response_format(AudioResponseFormat::VerboseJson)
39-
.timestamp_granularities(vec![TimestampGranularity::Word, TimestampGranularity::Segment])
39+
.timestamp_granularities(vec![
40+
TimestampGranularity::Word,
41+
TimestampGranularity::Segment,
42+
])
4043
.build()?;
4144

4245
let response = client.audio().transcribe_verbose_json(request).await?;

examples/function-call-stream/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use async_openai::types::{
66
ChatCompletionRequestFunctionMessageArgs, ChatCompletionRequestUserMessageArgs, FinishReason,
77
};
88
use async_openai::{
9-
types::{ChatCompletionFunctionsArgs, CreateChatCompletionRequestArgs, Role},
9+
types::{ChatCompletionFunctionsArgs, CreateChatCompletionRequestArgs},
1010
Client,
1111
};
1212

examples/function-call/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use async_openai::{
22
types::{
33
ChatCompletionFunctionsArgs, ChatCompletionRequestFunctionMessageArgs,
4-
ChatCompletionRequestUserMessageArgs, CreateChatCompletionRequestArgs, Role,
4+
ChatCompletionRequestUserMessageArgs, CreateChatCompletionRequestArgs,
55
},
66
Client,
77
};

0 commit comments

Comments
 (0)