2
0
mirror of https://github.com/wolfpld/tracy synced 2026-01-19 04:52:09 +00:00

Switch from Ollama API to OpenAI API commonly used by all LLM providers.

This commit is contained in:
Bartosz Taudul
2025-05-22 01:51:15 +02:00
parent b05bbc7f53
commit b398a4641a
13 changed files with 438 additions and 279 deletions

View File

@@ -1,13 +0,0 @@
diff --git i/include/ollama.hpp w/include/ollama.hpp
index eaa7a51..9c8ca18 100644
--- i/include/ollama.hpp
+++ w/include/ollama.hpp
@@ -851,7 +848,7 @@ class Ollama
}
else
{
- throw ollama::exception("Error retrieving version: "+res->status);
+ throw ollama::exception("Error retrieving version: "+std::to_string(res->status));
}
return version;

View File

@@ -1,16 +0,0 @@
diff --git i/include/ollama.hpp w/include/ollama.hpp
index eaa7a51..0f343b8 100644
--- i/include/ollama.hpp
+++ w/include/ollama.hpp
@@ -347,10 +347,7 @@ namespace ollama
return type;
}
- //operator std::string() const { return this->as_simple_string(); }
- operator std::__cxx11::basic_string<char>() const { return this->as_simple_string(); }
- //const operator std::string() const { return this->as_simple_string(); }
-
+ operator std::string() const { return this->as_simple_string(); }
private:

View File

@@ -237,18 +237,6 @@ CPMAddPackage(
EXCLUDE_FROM_ALL TRUE
)
# ollama-hpp
CPMAddPackage(
NAME ollama-hpp
GITHUB_REPOSITORY jmont-dev/ollama-hpp
VERSION 0.9.5
DOWNLOAD_ONLY TRUE
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/ollama-hpp-string.patch"
"${CMAKE_CURRENT_LIST_DIR}/ollama-hpp-badcode.patch"
)
# base64
set(BUILD_SHARED_LIBS_SAVE ${BUILD_SHARED_LIBS})