diff options
author | Oxbian <oxbian@mailbox.org> | 2025-02-21 16:17:00 -0500 |
---|---|---|
committer | Oxbian <oxbian@mailbox.org> | 2025-02-21 16:17:00 -0500 |
commit | bc53ad567b82ca354f2b8caf30f242717a5f46a6 (patch) | |
tree | 95da9eb36b5a905516bf98e3c88a7af3b19ced1d /src/app/init.rs | |
parent | 3930939d96a50ab41deddbc9fd6ef2b5cc29369e (diff) | |
download | NAI-bc53ad567b82ca354f2b8caf30f242717a5f46a6.tar.gz NAI-bc53ad567b82ca354f2b8caf30f242717a5f46a6.zip |
feat: scrollable chatbox
Diffstat (limited to 'src/app/init.rs')
-rw-r--r-- | src/app/init.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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 { |