diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index 18278221..f4d81b85 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -157,6 +157,8 @@ void TracyLlm::Draw() ImGui::EndCombo(); } + ImGui::Checkbox( "Enable tools", &m_enableTools ); + ImGui::AlignTextToFramePadding(); ImGui::TextUnformatted( "Context size:" ); ImGui::SameLine(); @@ -517,7 +519,7 @@ void TracyLlm::SendMessage( ollama::messages&& messages ) req["stream"] = true; req["options"] = options["options"]; req["keep_alive"] = "5m"; - req["tools"] = m_tools; // enabling tools prevents streaming in ollama 0.6.8 + if( m_enableTools ) req["tools"] = m_tools; // enabling tools prevents streaming in ollama 0.6.8 res = m_ollama->chat( req, [this]( const ollama::response& response ) -> bool { return OnResponse( response ); }); } diff --git a/profiler/src/profiler/TracyLlm.hpp b/profiler/src/profiler/TracyLlm.hpp index de3c7c80..5cfe5ca4 100644 --- a/profiler/src/profiler/TracyLlm.hpp +++ b/profiler/src/profiler/TracyLlm.hpp @@ -110,6 +110,7 @@ private: bool m_stop = false; bool m_wasUpdated = false; bool m_focusInput = false; + bool m_enableTools = true; char* m_input; std::unique_ptr m_chat;