diff --git a/Makefile b/Makefile index 9c365e7..cb21e15 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,19 @@ +# Check if a default C++ compiler exists, otherwise use g++ +CXX ?= g++ + all: examples test-cpp11 test-cpp14 test-cpp20 examples: examples/main.cpp mkdir -p build - g++ examples/main.cpp -Iinclude -o build/examples -std=c++11 -pthread -latomic + $(CXX) examples/main.cpp -Iinclude -o build/examples -std=c++11 -pthread -latomic test: test-cpp11 test-cpp11: test/test.cpp mkdir -p build - g++ test/test.cpp -Iinclude -Itest -o build/test -std=c++11 -pthread -latomic + $(CXX) test/test.cpp -Iinclude -Itest -o build/test -std=c++11 -pthread -latomic test-cpp14: test/test.cpp mkdir -p build - g++ test/test.cpp -Iinclude -Itest -o build/test-cpp14 -std=c++14 -pthread -latomic + $(CXX) test/test.cpp -Iinclude -Itest -o build/test-cpp14 -std=c++14 -pthread -latomic test-cpp20: test/test.cpp mkdir -p build - g++ test/test.cpp -Iinclude -Itest -o build/test-cpp20 -std=c++2a -pthread -latomic + $(CXX) test/test.cpp -Iinclude -Itest -o build/test-cpp20 -std=c++2a -pthread -latomic clean: rm -rf build diff --git a/README.md b/README.md index 0806b96..f06afb0 100644 --- a/README.md +++ b/README.md @@ -400,7 +400,7 @@ Debug logging for requests and replies to the server can easily be turned on and ```C++ ollama::show_requests(true); ollama::show_replies(true); - ``` +``` ### Manual Requests For those looking for greater control of the requests sent to the ollama server, manual requests can be created through the `ollama::request` class. This class extends `nlohmann::json` and can be treated as a standard JSON object.