diff --git a/index.html b/index.html
deleted file mode 100644
index a5c14a3..0000000
--- a/index.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
- Tour - Iced
-
-
-
-
-
-
-
diff --git a/src/api.rs b/src/api.rs
index 12dc0b2..15dc777 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -5,8 +5,6 @@ use tokio_stream::wrappers::LinesStream;
use tokio_stream::{Stream, StreamExt};
use tokio_util::io::StreamReader;
-const API_URL: &'static str = "http://localhost:11434";
-
pub struct OllamaAPI {
api_url: &'static str,
client: Client,
@@ -16,9 +14,10 @@ pub struct OllamaAPI {
pub struct OllamaChat<'a> {
#[serde(skip_serializing)]
api: &'a OllamaAPI,
- model: String,
#[serde(skip_serializing)]
history_size: u32,
+
+ model: String,
messages: Vec,
}
@@ -63,7 +62,7 @@ impl OllamaAPI {
let request = self
.client
- .post(String::from(API_URL) + "/api/chat")
+ .post(String::from(self.api_url) + "/api/chat")
.body(serde_json::to_string(&chat)?)
.build()?;
let stream = self