From b0d3330c67b6874a1eaf23978749b26d99fbdfab Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 6 May 2025 18:01:11 -0400 Subject: Switch Python to unstable and add pydantic-ai Pydantic-ai is an agent framework that seems simple and good: well-typed with pydantic, tool usage is just an `@tool` decorator on a function, and so on. While building these I realized there were some deps they needed that were already in nixpkgs unstable, so I just switched to that instead of trying to backport all the versions and stuff. --- Omni/Bild/Python.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Omni/Bild/Python.nix') diff --git a/Omni/Bild/Python.nix b/Omni/Bild/Python.nix index 36abe25..7ae9aa9 100644 --- a/Omni/Bild/Python.nix +++ b/Omni/Bild/Python.nix @@ -4,6 +4,7 @@ _self: super: { with pysuper.pkgs.python312Packages; let dontCheck = p: p.overridePythonAttrs (_: {doCheck = false;}); in { + anyio = dontCheck pysuper.anyio; interegular = callPackage ./Deps/interegular.nix {}; ipython = dontCheck pysuper.ipython; llm = super.overrideSrc pysuper.llm super.sources.llm; @@ -11,6 +12,7 @@ _self: super: { ollama = pyself.ollama; }; llm-sentence-transformers = callPackage ./Deps/llm-sentence-transformers.nix {}; + logfire-api = callPackage ./Deps/logfire-api.nix {}; ludic = callPackage ./Deps/ludic.nix {}; mypy = dontCheck pysuper.mypy; ollama = pysuper.ollama.overridePythonAttrs (old: rec { @@ -22,8 +24,10 @@ _self: super: { --replace-fail "0.0.0" "${version}" ''; }); - openai = callPackage ./Deps/openai-python.nix {}; outlines = callPackage ./Deps/outlines.nix {}; + pydantic-ai = callPackage ./Deps/pydantic-ai.nix {}; + pydantic-ai-slim = callPackage ./Deps/pydantic-ai-slim.nix {}; + pydantic-graph = callPackage ./Deps/pydantic-graph.nix {}; perscache = callPackage ./Deps/perscache.nix {}; tokenizers = dontCheck pysuper.tokenizers; }; -- cgit v1.2.3