From 9716acb4db30dfa993130f20ac7c36c134d27297 Mon Sep 17 00:00:00 2001 From: James Montgomery Date: Thu, 1 Aug 2024 01:58:35 -0400 Subject: [PATCH] Delete httplib when Ollama class is destroyed. --- include/ollama.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ollama.hpp b/include/ollama.hpp index de81f38..2fad3e6 100644 --- a/include/ollama.hpp +++ b/include/ollama.hpp @@ -374,7 +374,7 @@ class Ollama } Ollama(): Ollama("http://localhost:11434") {} - ~Ollama() {} + ~Ollama() { delete this->cli; } // Generate a non-streaming reply as a string. ollama::response generate(const std::string& model,const std::string& prompt, const json& options=nullptr, const std::vector& images=std::vector())