Unverified Commit 18bf2b64 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

python3Packages.langchain-mistralai: init at 0.2.10 (#403130)

parents 07bd4a9d 588806b4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ declare -ar packages=(
    langchain-core
    langchain-groq
    langchain-huggingface
    langchain-mistralai
    langchain-mongodb
    langchain-ollama
    langchain-openai
+79 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  nix-update-script,

  # build-system
  pdm-backend,

  # dependencies
  langchain-core,
  tokenizers,
  httpx,
  httpx-sse,
  pydantic,

  # tests
  langchain-tests,
  pytest-asyncio,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "langchain-mistralai";
  version = "0.2.10";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "langchain-ai";
    repo = "langchain";
    tag = "langchain-mistralai==${version}";
    hash = "sha256-1oH9GRvjYv/YzedKXeWgw5nwNgMQ9mSNkmZ2xwPekXc=";
  };

  sourceRoot = "${src.name}/libs/partners/mistralai";

  build-system = [ pdm-backend ];

  dependencies = [
    langchain-core
    tokenizers
    httpx
    httpx-sse
    pydantic
  ];

  pythonRelaxDeps = [
    # Each component release requests the exact latest core.
    # That prevents us from updating individual components.
    "langchain-core"
  ];

  nativeCheckInputs = [
    langchain-tests
    pytest-asyncio
    pytestCheckHook
  ];

  pytestFlagsArray = [ "tests/unit_tests" ];

  pythonImportsCheck = [ "langchain_mistralai" ];

  passthru.updateScript = nix-update-script {
    extraArgs = [
      "--version-regex"
      "langchain-mistralai==([0-9.]+)"
    ];
  };

  meta = {
    changelog = "https://github.com/langchain-ai/langchain-mistralai/releases/tag/langchain-mistralai==${version}";
    description = "Build LangChain applications with mistralai";
    homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/mistralai";
    license = lib.licenses.mit;
    maintainers = [
      lib.maintainers.sarahec
    ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -7540,6 +7540,8 @@ self: super: with self; {
  langchain-huggingface = callPackage ../development/python-modules/langchain-huggingface { };
  langchain-mistralai = callPackage ../development/python-modules/langchain-mistralai { };
  langchain-mongodb = callPackage ../development/python-modules/langchain-mongodb { };
  langchain-ollama = callPackage ../development/python-modules/langchain-ollama { };