ollama4j/Makefile
Amith Koujalgi 2d7902167b
Enhance OllamaAPI and documentation for structured responses
- Updated OllamaAPI to return an instance of OllamaResult instead of OllamaStructuredResult for structured responses.
- Removed the obsolete OllamaStructuredResult class.
- Added new methods in OllamaResult for retrieving structured responses as a Map or mapped to a specific class type.
- Updated integration tests to validate the new structured response functionality.
- Improved Makefile with a new full-build target for building the project.
2025-03-24 15:30:00 +05:30

39 lines
1.1 KiB
Makefile

dev:
@echo "Setting up dev environment..."
@command -v pre-commit >/dev/null 2>&1 || { echo "Error: pre-commit is not installed. Please install it first."; exit 1; }
@command -v docker >/dev/null 2>&1 || { echo "Error: docker is not installed. Please install it first."; exit 1; }
pre-commit install
pre-commit autoupdate
pre-commit install --install-hooks
build:
mvn -B clean install -Dgpg.skip=true
full-build:
mvn -B clean install
unit-tests:
mvn clean test -Punit-tests
integration-tests:
mvn clean verify -Pintegration-tests
doxygen:
doxygen Doxyfile
list-releases:
curl 'https://central.sonatype.com/api/internal/browse/component/versions?sortField=normalizedVersion&sortDirection=desc&page=0&size=20&filter=namespace%3Aio.github.ollama4j%2Cname%3Aollama4j' \
--compressed \
--silent | jq -r '.components[].version'
build-docs:
npm i --prefix docs && npm run build --prefix docs
start-docs:
npm i --prefix docs && npm run start --prefix docs
start-cpu:
docker run -it -v ~/ollama:/root/.ollama -p 11434:11434 ollama/ollama
start-gpu:
docker run -it --gpus=all -v ~/ollama:/root/.ollama -p 11434:11434 ollama/ollama