Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798{ lib, aiolimiter, azure-identity, azure-storage-blob, buildPythonPackage, fetchPypi, hatchling, httpx, json-repair, numpy, openai, polyfactory, pydantic, pytest-asyncio, pytest-cov-stub, pytestCheckHook, pythonAtLeast, tenacity, tiktoken, uv-dynamic-versioning,}:
buildPythonPackage (finalAttrs: { pname = "fnllm"; version = "0.4.1"; pyproject = true;
src = fetchPypi { inherit (finalAttrs) pname version; hash = "sha256-gKdFBpNpG/CDLhKi1wQgZHv+o1pDy5HEqcteLzkXK1A="; };
build-system = [ hatchling uv-dynamic-versioning ];
dependencies = [ aiolimiter httpx json-repair pydantic tenacity ];
optional-dependencies = { azure = [ azure-identity azure-storage-blob ]; numpy = [ numpy ]; openai = [ openai tiktoken ]; };
nativeCheckInputs = [ polyfactory pytest-asyncio pytest-cov-stub pytestCheckHook ] ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies;
pythonImportsCheck = [ "fnllm" ];
disabledTests = [ # Tests require network access "chat" "embeddings" "rate_limited" "test_default_operations" "test_estimate_request_tokens" "test_replace_value" "test_text_service_encode_decode" "test_count_tokens" "trim_to_max_tokens" "test_split" "test_clear" "test_handles_common_errors" "test_children" ] ++ lib.optionals (pythonAtLeast "3.13") [ # RuntimeError: There is no current event loop in thread 'MainThread' "test_call_batch_raises_if_response_length_mismatch" ];
meta = { description = "Function-based LLM protocol and wrapper"; homepage = "https://github.com/microsoft/essex-toolkit/tree/main/python/fnllm"; changelog = "https://github.com/microsoft/essex-toolkit/blob/fnllm-v${finalAttrs.version}/python/fnllm/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; };})