mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
fmt/clippy
This commit is contained in:
parent
29503ba95e
commit
22fde1f333
6 changed files with 6 additions and 8 deletions
|
|
@ -230,7 +230,6 @@ impl IntoModels for Vec<LlmProvider> {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
impl Default for LlmProvider {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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?
|
||||
|
|
|
|||
|
|
@ -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![])
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
pub mod types;
|
||||
pub mod builder;
|
||||
pub mod types;
|
||||
|
||||
pub type OpenAIRequestBuilder = builder::OpenAIRequestBuilder;
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue