mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-06 10:28:32 +00:00
httplib may throw on invalid protocol.
This commit is contained in:
@@ -15,8 +15,16 @@ TracyLlm::TracyLlm()
|
||||
{
|
||||
if( !s_config.llm ) return;
|
||||
|
||||
m_ollama = std::make_unique<Ollama>( s_config.llmAddress );
|
||||
if( !m_ollama->is_running() )
|
||||
try
|
||||
{
|
||||
m_ollama = std::make_unique<Ollama>( s_config.llmAddress );
|
||||
if( !m_ollama->is_running() )
|
||||
{
|
||||
m_ollama.reset();
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch( const std::exception& e )
|
||||
{
|
||||
m_ollama.reset();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user