Skip to content

Commit 18bf2b6

Browse files
authored
python3Packages.langchain-mistralai: init at 0.2.10 (#403130)
2 parents 07bd4a9 + 588806b commit 18bf2b6

File tree

3 files changed

+82
-0
lines changed

3 files changed

+82
-0
lines changed

pkgs/development/python-modules/langchain-core/update.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ declare -ar packages=(
1111
langchain-core
1212
langchain-groq
1313
langchain-huggingface
14+
langchain-mistralai
1415
langchain-mongodb
1516
langchain-ollama
1617
langchain-openai
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
nix-update-script,
6+
7+
# build-system
8+
pdm-backend,
9+
10+
# dependencies
11+
langchain-core,
12+
tokenizers,
13+
httpx,
14+
httpx-sse,
15+
pydantic,
16+
17+
# tests
18+
langchain-tests,
19+
pytest-asyncio,
20+
pytestCheckHook,
21+
}:
22+
23+
buildPythonPackage rec {
24+
pname = "langchain-mistralai";
25+
version = "0.2.10";
26+
pyproject = true;
27+
28+
src = fetchFromGitHub {
29+
owner = "langchain-ai";
30+
repo = "langchain";
31+
tag = "langchain-mistralai==${version}";
32+
hash = "sha256-1oH9GRvjYv/YzedKXeWgw5nwNgMQ9mSNkmZ2xwPekXc=";
33+
};
34+
35+
sourceRoot = "${src.name}/libs/partners/mistralai";
36+
37+
build-system = [ pdm-backend ];
38+
39+
dependencies = [
40+
langchain-core
41+
tokenizers
42+
httpx
43+
httpx-sse
44+
pydantic
45+
];
46+
47+
pythonRelaxDeps = [
48+
# Each component release requests the exact latest core.
49+
# That prevents us from updating individual components.
50+
"langchain-core"
51+
];
52+
53+
nativeCheckInputs = [
54+
langchain-tests
55+
pytest-asyncio
56+
pytestCheckHook
57+
];
58+
59+
pytestFlagsArray = [ "tests/unit_tests" ];
60+
61+
pythonImportsCheck = [ "langchain_mistralai" ];
62+
63+
passthru.updateScript = nix-update-script {
64+
extraArgs = [
65+
"--version-regex"
66+
"langchain-mistralai==([0-9.]+)"
67+
];
68+
};
69+
70+
meta = {
71+
changelog = "https://github.com/langchain-ai/langchain-mistralai/releases/tag/langchain-mistralai==${version}";
72+
description = "Build LangChain applications with mistralai";
73+
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/mistralai";
74+
license = lib.licenses.mit;
75+
maintainers = [
76+
lib.maintainers.sarahec
77+
];
78+
};
79+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7540,6 +7540,8 @@ self: super: with self; {
75407540

75417541
langchain-huggingface = callPackage ../development/python-modules/langchain-huggingface { };
75427542

7543+
langchain-mistralai = callPackage ../development/python-modules/langchain-mistralai { };
7544+
75437545
langchain-mongodb = callPackage ../development/python-modules/langchain-mongodb { };
75447546

75457547
langchain-ollama = callPackage ../development/python-modules/langchain-ollama { };

0 commit comments

Comments
 (0)