python313Packages.docling-serve: add docling-mcp (#441022)
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
{
|
||||
lib,
|
||||
accelerate,
|
||||
buildPythonPackage,
|
||||
docling,
|
||||
fetchFromGitHub,
|
||||
hatchling,
|
||||
httpx,
|
||||
llama-index-core,
|
||||
llama-index-embeddings-huggingface,
|
||||
llama-index-embeddings-openai,
|
||||
llama-index-llms-openai-like,
|
||||
llama-index-node-parser-docling,
|
||||
llama-index-readers-docling,
|
||||
llama-index-readers-file,
|
||||
llama-index-vector-stores-milvus,
|
||||
llama-index,
|
||||
llama-stack-client,
|
||||
mcp,
|
||||
ollama,
|
||||
pydantic-settings,
|
||||
pydantic,
|
||||
pytest-asyncio,
|
||||
pytestCheckHook,
|
||||
python-dotenv,
|
||||
smolagents,
|
||||
torch,
|
||||
transformers,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "docling-mcp";
|
||||
version = "1.2.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "docling-project";
|
||||
repo = "docling-mcp";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-ktJ5K+1Qb7/lUHPkmv2FMnSe6PiIQ1BvWj5qIG8xfdE=";
|
||||
};
|
||||
|
||||
pythonRemoveDeps = [
|
||||
# Disabled due to circular dependency
|
||||
"mellea"
|
||||
];
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
dependencies = [
|
||||
docling
|
||||
httpx
|
||||
mcp
|
||||
pydantic
|
||||
pydantic-settings
|
||||
python-dotenv
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
llama-index-rag = [
|
||||
llama-index
|
||||
llama-index-core
|
||||
llama-index-embeddings-huggingface
|
||||
llama-index-embeddings-openai
|
||||
llama-index-llms-openai-like
|
||||
llama-index-node-parser-docling
|
||||
llama-index-readers-docling
|
||||
llama-index-readers-file
|
||||
llama-index-vector-stores-milvus
|
||||
];
|
||||
llama-stack = [ llama-stack-client ];
|
||||
smolagents = [
|
||||
accelerate
|
||||
ollama
|
||||
smolagents
|
||||
torch
|
||||
transformers
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "docling_mcp" ];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Tests require network access
|
||||
"tests/test_mcp_server.py"
|
||||
"tests/test_conversion_tools.py"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Making docling agentic through MCP";
|
||||
homepage = "https://github.com/docling-project/docling-mcp";
|
||||
changelog = "https://github.com/docling-project/docling-mcp/blob/${src.tag}/CHANGELOG.md";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
# python dependencies
|
||||
docling,
|
||||
docling-jobkit,
|
||||
docling-mcp,
|
||||
fastapi,
|
||||
httpx,
|
||||
pydantic-settings,
|
||||
@@ -57,6 +58,7 @@ buildPythonPackage rec {
|
||||
dependencies = [
|
||||
docling
|
||||
(docling-jobkit.override { inherit withTesserocr withRapidocr; })
|
||||
docling-mcp
|
||||
fastapi
|
||||
httpx
|
||||
pydantic-settings
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
docling-core,
|
||||
fetchPypi,
|
||||
hatchling,
|
||||
llama-index-core,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-node-parser-docling";
|
||||
version = "0.4.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_node_parser_docling";
|
||||
inherit version;
|
||||
hash = "sha256-3D2X5sKAaweJG5w5qVeCEMgvKPZVUdI4/GsSwB9zfQ4=";
|
||||
};
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
dependencies = [
|
||||
docling-core
|
||||
llama-index-core
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "llama_index.node_parser.docling" ];
|
||||
|
||||
# Module has no tests
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Llama-index node_parser docling integration";
|
||||
homepage = "https://pypi.org/project/llama-index-node-parser-docling/";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
docling-core,
|
||||
docling,
|
||||
fetchPypi,
|
||||
hatchling,
|
||||
llama-index-core,
|
||||
numpy,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-readers-docling";
|
||||
version = "0.4.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_readers_docling";
|
||||
inherit version;
|
||||
hash = "sha256-b9UxJWlh/KnfTIOcKe9jiWCD1VknqeJH2hQjrDNmsOg=";
|
||||
};
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
dependencies = [
|
||||
docling
|
||||
docling-core
|
||||
llama-index-core
|
||||
numpy
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "llama_index.readers.docling" ];
|
||||
|
||||
# Module has no tests
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Llama-index readers docling integration";
|
||||
homepage = "https://pypi.org/project/llama-index-readers-docling/";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
hatchling,
|
||||
llama-index-core,
|
||||
pymilvus,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-index-vector-stores-milvus";
|
||||
version = "0.9.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_index_vector_stores_milvus";
|
||||
inherit version;
|
||||
hash = "sha256-8alWmT1CglPpvDqbav7AoahIOcabchsiUmrAbBeOyZI=";
|
||||
};
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
dependencies = [
|
||||
llama-index-core
|
||||
pymilvus
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "llama_index.vector_stores.milvus" ];
|
||||
|
||||
# Module has no tests
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Llama-index vector_stores milvus integration";
|
||||
homepage = "https://pypi.org/project/llama-index-vector-stores-milvus/";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
{
|
||||
lib,
|
||||
aiohttp,
|
||||
anyio,
|
||||
buildPythonPackage,
|
||||
click,
|
||||
dirty-equals,
|
||||
distro,
|
||||
fetchPypi,
|
||||
fire,
|
||||
hatch-fancy-pypi-readme,
|
||||
hatchling,
|
||||
httpx-aiohttp,
|
||||
httpx,
|
||||
nest-asyncio,
|
||||
pandas,
|
||||
prompt-toolkit,
|
||||
pyaml,
|
||||
pydantic,
|
||||
pytest-asyncio,
|
||||
pytest-xdist,
|
||||
pytestCheckHook,
|
||||
requests,
|
||||
respx,
|
||||
rich,
|
||||
sniffio,
|
||||
termcolor,
|
||||
tqdm,
|
||||
typing-extensions,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "llama-stack-client";
|
||||
version = "0.2.20";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "llama_stack_client";
|
||||
inherit version;
|
||||
hash = "sha256-NWJX8KS7tkIF+J4RPXFZJYU9XjTsdE5yRm2nJ5C6QVs=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "hatchling==1.26.3" "hatchling"
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
hatch-fancy-pypi-readme
|
||||
hatchling
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
anyio
|
||||
click
|
||||
distro
|
||||
fire
|
||||
httpx
|
||||
pandas
|
||||
prompt-toolkit
|
||||
pyaml
|
||||
pydantic
|
||||
requests
|
||||
rich
|
||||
sniffio
|
||||
termcolor
|
||||
tqdm
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
aiohttp = [
|
||||
aiohttp
|
||||
httpx-aiohttp
|
||||
];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
dirty-equals
|
||||
nest-asyncio
|
||||
pytest-asyncio
|
||||
pytest-xdist
|
||||
pytestCheckHook
|
||||
respx
|
||||
]
|
||||
++ lib.flatten (builtins.attrValues optional-dependencies);
|
||||
|
||||
pythonImportsCheck = [ "llama_stack_client" ];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Tests require network access
|
||||
"tests/api_resources/"
|
||||
"tests/test_client.py"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Library for the llama-stack-client API";
|
||||
homepage = "https://github.com/llamastack/llama-stack-client-python";
|
||||
changelog = "https://github.com/llamastack/llama-stack-client-python/releases/tag/v${version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
@@ -4268,6 +4268,8 @@ self: super: with self; {
|
||||
|
||||
docling-jobkit = callPackage ../development/python-modules/docling-jobkit { };
|
||||
|
||||
docling-mcp = callPackage ../development/python-modules/docling-mcp { };
|
||||
|
||||
docling-parse = callPackage ../development/python-modules/docling-parse {
|
||||
loguru-cpp = pkgs.loguru;
|
||||
};
|
||||
@@ -8548,10 +8550,18 @@ self: super: with self; {
|
||||
callPackage ../development/python-modules/llama-index-multi-modal-llms-openai
|
||||
{ };
|
||||
|
||||
llama-index-node-parser-docling =
|
||||
callPackage ../development/python-modules/llama-index-node-parser-docling
|
||||
{ };
|
||||
|
||||
llama-index-readers-database =
|
||||
callPackage ../development/python-modules/llama-index-readers-database
|
||||
{ };
|
||||
|
||||
llama-index-readers-docling =
|
||||
callPackage ../development/python-modules/llama-index-readers-docling
|
||||
{ };
|
||||
|
||||
llama-index-readers-file = callPackage ../development/python-modules/llama-index-readers-file { };
|
||||
|
||||
llama-index-readers-json = callPackage ../development/python-modules/llama-index-readers-json { };
|
||||
@@ -8580,6 +8590,10 @@ self: super: with self; {
|
||||
callPackage ../development/python-modules/llama-index-vector-stores-google
|
||||
{ };
|
||||
|
||||
llama-index-vector-stores-milvus =
|
||||
callPackage ../development/python-modules/llama-index-vector-stores-milvus
|
||||
{ };
|
||||
|
||||
llama-index-vector-stores-postgres =
|
||||
callPackage ../development/python-modules/llama-index-vector-stores-postgres
|
||||
{ };
|
||||
@@ -8592,6 +8606,8 @@ self: super: with self; {
|
||||
|
||||
llama-parse = callPackage ../development/python-modules/llama-parse { };
|
||||
|
||||
llama-stack-client = callPackage ../development/python-modules/llama-stack-client { };
|
||||
|
||||
llamaindex-py-client = callPackage ../development/python-modules/llamaindex-py-client { };
|
||||
|
||||
llfuse = callPackage ../development/python-modules/llfuse { inherit (pkgs) fuse; };
|
||||
|
||||
Reference in New Issue
Block a user