File tree Expand file tree Collapse file tree 2 files changed +70
-0
lines changed
development/python-modules/langchain-ollama Expand file tree Collapse file tree 2 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ buildPythonPackage ,
4+ fetchFromGitHub ,
5+
6+ # build-system
7+ poetry-core ,
8+
9+ # dependencies
10+ langchain-core ,
11+ ollama ,
12+
13+ # testing
14+ langchain-standard-tests ,
15+ pytestCheckHook ,
16+ pytest-asyncio ,
17+ syrupy ,
18+
19+ nix-update-script ,
20+ } :
21+
22+ buildPythonPackage rec {
23+ pname = "langchain-ollama" ;
24+ version = "0.2.0" ;
25+ pyproject = true ;
26+
27+ src = fetchFromGitHub {
28+ owner = "langchain-ai" ;
29+ repo = "langchain" ;
30+ rev = "refs/tags/langchain-ollama==${ version } " ;
31+ hash = "sha256-NtlJqIevdaoOO4oDqKsL4OFbw8tHb3FjV9LrTytOGKE=" ;
32+ } ;
33+
34+ sourceRoot = "${ src . name } /libs/partners/ollama" ;
35+
36+ build-system = [ poetry-core ] ;
37+
38+ dependencies = [
39+ langchain-core
40+ ollama
41+ ] ;
42+
43+ nativeCheckInputs = [
44+ langchain-standard-tests
45+ pytestCheckHook
46+ pytest-asyncio
47+ syrupy
48+ ] ;
49+
50+ pytestFlagsArray = [ "tests/unit_tests" ] ;
51+
52+ pythonImportsCheck = [ "langchain_ollama" ] ;
53+
54+ passthru . updateScript = nix-update-script {
55+ extraArgs = [
56+ "--version-regex"
57+ "langchain-ollama==(.*)"
58+ ] ;
59+ } ;
60+
61+ meta = {
62+ changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-ollama==${ version } " ;
63+ description = "Integration package connecting Ollama and LangChain" ;
64+ homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/ollama" ;
65+ license = lib . licenses . mit ;
66+ maintainers = with lib . maintainers ; [ sarahec ] ;
67+ } ;
68+ }
Original file line number Diff line number Diff line change @@ -6825,6 +6825,8 @@ self: super: with self; {
68256825
68266826 langchain-mongodb = callPackage ../development/python-modules/langchain-mongodb { };
68276827
6828+ langchain-ollama = callPackage ../development/python-modules/langchain-ollama { };
6829+
68286830 langchain-openai = callPackage ../development/python-modules/langchain-openai { };
68296831
68306832 langchain-standard-tests = callPackage ../development/python-modules/langchain-standard-tests { };
You can’t perform that action at this time.
0 commit comments