From 415439e6641e7917f12f75f704b5e26842c014f5 Mon Sep 17 00:00:00 2001 From: lux Date: Thu, 13 Jun 2024 04:24:58 +0800 Subject: [PATCH] use asDeref --- src/transformer_backends/ollama.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/transformer_backends/ollama.rs b/src/transformer_backends/ollama.rs index c1de053..6f1a6b1 100644 --- a/src/transformer_backends/ollama.rs +++ b/src/transformer_backends/ollama.rs @@ -70,8 +70,8 @@ impl Ollama { .post(self .configuration .generate_endpoint - .as_ref() - .unwrap_or(&"http://localhost:11434/api/generate".to_string()) + .as_deref() + .unwrap_or("http://localhost:11434/api/generate") ) .header("Content-Type", "application/json") .header("Accept", "application/json") @@ -109,8 +109,8 @@ impl Ollama { .post(self .configuration .chat_endpoint - .as_ref() - .unwrap_or(&"http://localhost:11434/api/chat".to_string()) + .as_deref() + .unwrap_or("http://localhost:11434/api/chat") ) .header("Content-Type", "application/json") .header("Accept", "application/json")