Something went wrong. Try again.
lol
Something went wrong. Try again.
1.9 kB · 101 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102{ lib, buildPythonPackage, fetchFromGitHub,
# build-system hatchling,
# dependencies eval-type-backport, httpx, jsonpath-python, opentelemetry-api, opentelemetry-semantic-conventions, pydantic, python-dateutil, typing-inspection,
# optional-dependencies authlib, griffe, mcp, google-auth, requests,
# tests opentelemetry-sdk, pytestCheckHook,}:
buildPythonPackage (finalAttrs: { pname = "mistralai"; version = "2.3.2"; pyproject = true;
src = fetchFromGitHub { owner = "mistralai"; repo = "client-python"; tag = "v${finalAttrs.version}"; hash = "sha256-aqKM85gBvOyfAsps29u6okuQFJ+GzS2AGFgY1H4Tkmw="; };
preBuild = '' python scripts/prepare_readme.py '';
build-system = [ hatchling ];
pythonRelaxDeps = [ "opentelemetry-semantic-conventions" ]; dependencies = [ eval-type-backport httpx jsonpath-python opentelemetry-api opentelemetry-semantic-conventions pydantic python-dateutil typing-inspection ];
optional-dependencies = { agents = [ authlib griffe mcp ]; gcp = [ google-auth requests ]; };
pythonImportsCheck = [ "mistralai" ];
nativeCheckInputs = [ opentelemetry-sdk pytestCheckHook ] ++ finalAttrs.passthru.optional-dependencies.agents ++ finalAttrs.passthru.optional-dependencies.gcp;
disabledTests = [ # AssertionError: <Response [200 OK]> is not an instance of <class 'mistralai.extra.observability.otel.TracedResponse'> "TestOtelTracing" ];
meta = { description = "Python client library for Mistral AI platform"; homepage = "https://github.com/mistralai/client-python"; changelog = "https://github.com/mistralai/client-python/blob/${finalAttrs.src.tag}/RELEASES.md"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ GaetanLepage mana-byte ]; };})