From bc53ad567b82ca354f2b8caf30f242717a5f46a6 Mon Sep 17 00:00:00 2001 From: Oxbian Date: Fri, 21 Feb 2025 16:17:00 -0500 Subject: feat: scrollable chatbox --- src/app/init.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/app') diff --git a/src/app/init.rs b/src/app/init.rs index ff9f130..eabf204 100644 --- a/src/app/init.rs +++ b/src/app/init.rs @@ -1,3 +1,4 @@ +use crate::helper::init::print_in_file; use color_eyre::Result; use reqwest; use serde_json::Value; @@ -48,7 +49,7 @@ impl App { .post("http://localhost:8080/completion") .json(&serde_json::json!({ "prompt": &content, - "n_predict": 128, + "n_predict": 400, })) .send()?; @@ -56,6 +57,7 @@ impl App { // Désérialiser la réponse JSON let json_response: Value = response.json()?; + //print_in_file(json_response.to_string().clone()); // Accéder à la partie spécifique du JSON if let Some(msg) = json_response["content"].as_str() { self.messages.push(Message { -- cgit v1.2.3