oh god oh fuck i committed broken llama-cpp-agent

This commit is contained in:
TheK0tYaRa 2026-02-15 15:00:23 +02:00
parent 8f304b603d
commit 5791aa145d

View file

@ -2,62 +2,60 @@
lib,
buildPythonPackage,
fetchFromGitHub,
llama-cpp,
pythonOlder,
pythonRelaxDepsHook,
setuptools,
pyyaml,
wheel,
#
llama-cpp-python,
pydantic,
requests,
numpy,
jinja2,
docstring-parser,
aiohttp,
}:
buildPythonPackage rec {
pname = "llama-cpp-agent";
version = "0.2.35"; # Check for the latest release on GitHub
version = "0.2.35";
pyproject = true;
disabled = pythonOlder "3.9";
# Fetch the latest source from GitHub
src = fetchFromGitHub {
owner = "Maximilian-Winter";
repo = "llama-cpp-agent";
# Use the latest release tag or commit hash. For the tag 'v0.2.21':
rev = "v${version}";
hash = "sha256-Z6QDK/5DPidYS/yGz6JC6gPOBvnm7Yc1cNTdCLLT2Fw="; # You MUST update this hash
rev = "${version}";
hash = "sha256-r4bJK18JbuXndoNh6xdUvUjiUiw4Opuj/IQ+Tal0viQ=";
};
# This hook will automatically relax version constraints in `pyproject.toml` if needed
nativeBuildInputs = [
pythonRelaxDepsHook
# pythonRelaxDepsHook
setuptools
];
# Relax overly strict dependencies, especially for `llama-cpp-python`
pythonRelaxDeps = [
"llama-cpp-python"
];
# pythonRelaxDeps = [
# "llama-cpp-python"
# ];
propagatedBuildInputs = [
# The framework requires a llama-cpp-python binding.
# We use the one provided by Nixpkgs, which is built against the system's `llama-cpp`.
llama-cpp.python312Packages.llama-cpp-python # Use the Python version you need (e.g., python311Packages)
pyyaml
llama-cpp-python
pydantic
requests
numpy
jinja2
docstring-parser
aiohttp
];
# Optional: Run basic tests if available
pythonImportsCheck = [ "llama_cpp_agent" ];
meta = with lib; {
description = "A framework for easy interaction with Large Language Models (LLMs), supporting chat, structured function calls, and structured output";
longDescription = ''
The llama-cpp-agent framework is a tool designed for easy interaction with Large Language Models (LLMs).
Allowing users to chat with LLM models, execute structured function calls and get structured output.
Works also with models not fine-tuned to JSON output and function calls.
'';
homepage = "https://github.com/Maximilian-Winter/llama-cpp-agent";
license = licenses.mit;
maintainers = with maintainers; [
# You can add your name here
];
broken = true;
maintainers = with maintainers; [ ];
};
}