Compare commits
No commits in common. "4d60f2f208d4a2b241cb16ba47157a2ae6f85303" and "be17c9b92948a7d74ea39032797deb9844b19d74" have entirely different histories.
4d60f2f208
...
be17c9b929
3 changed files with 3 additions and 3 deletions
|
|
@ -87,10 +87,10 @@ async fn main() -> std::io::Result<()> {
|
|||
.service(list_emails)
|
||||
.service(send_email)
|
||||
.service(chat_stream)
|
||||
.service(generic_chat_completions)
|
||||
.service(chat)
|
||||
.service(chat_completions_local)
|
||||
.service(save_draft)
|
||||
.service(generic_chat_completions)
|
||||
.service(embeddings_local)
|
||||
.service(get_latest_email_from)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ pub fn first_keyword(engine: &mut Engine) {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use rhai::Engine;
|
||||
use rhai::{Dynamic, Engine};
|
||||
|
||||
fn setup_engine() -> Engine {
|
||||
let mut engine = Engine::new();
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ struct Choice {
|
|||
finish_reason: String,
|
||||
}
|
||||
|
||||
fn _clean_request_body(body: &str) -> String {
|
||||
fn clean_request_body(body: &str) -> String {
|
||||
// Remove problematic parameters that might not be supported by all providers
|
||||
let re = Regex::new(r#","?\s*"(max_completion_tokens|parallel_tool_calls|top_p|frequency_penalty|presence_penalty)"\s*:\s*[^,}]*"#).unwrap();
|
||||
re.replace_all(body, "").to_string()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue