fmt/clippy

This commit is contained in:
Adil Hafeez 2025-06-05 12:06:50 -07:00
parent 29503ba95e
commit 22fde1f333
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
6 changed files with 6 additions and 8 deletions

View file

@ -230,7 +230,6 @@ impl IntoModels for Vec<LlmProvider> {
}
}
impl Default for LlmProvider {
fn default() -> Self {
Self {

View file

@ -1,7 +1,7 @@
use proxy_wasm::types::Status;
use crate::{api::open_ai::ChatCompletionChunkResponseError, ratelimit};
use hermesllm::providers::openai::types::{OpenAIError};
use hermesllm::providers::openai::types::OpenAIError;
#[derive(thiserror::Error, Debug)]
pub enum ClientError {

View file

@ -14,7 +14,7 @@ pub fn token_count(model_name: &str, text: &str) -> Result<usize, String> {
);
"gpt-4"
}
true => model_name
true => model_name,
};
// Consideration: is it more expensive to instantiate the BPE object every time, or to contend the singleton?

View file

@ -7,8 +7,6 @@ pub mod providers;
mod tests {
use crate::providers::openai::types::ChatCompletionsRequest;
#[test]
fn openai_builder() {
let request = ChatCompletionsRequest::builder("gpt-3.5-turbo", vec![])

View file

@ -1,4 +1,4 @@
pub mod types;
pub mod builder;
pub mod types;
pub type OpenAIRequestBuilder = builder::OpenAIRequestBuilder;

View file

@ -367,7 +367,8 @@ data: [DONE]"#;
"stream": true
} "#;
let chat_completions_request: ChatCompletionsRequest = ChatCompletionsRequest::try_from(CHAT_COMPLETIONS_REQUEST.as_bytes())
.expect("Failed to parse ChatCompletionsRequest");
let chat_completions_request: ChatCompletionsRequest =
ChatCompletionsRequest::try_from(CHAT_COMPLETIONS_REQUEST.as_bytes())
.expect("Failed to parse ChatCompletionsRequest");
}
}