2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
hatchling,
|
|
|
|
boilerpy3,
|
|
|
|
events,
|
|
|
|
httpx,
|
|
|
|
jsonschema,
|
|
|
|
lazy-imports,
|
|
|
|
more-itertools,
|
|
|
|
networkx,
|
|
|
|
pandas,
|
|
|
|
pillow,
|
|
|
|
platformdirs,
|
|
|
|
posthog,
|
|
|
|
prompthub-py,
|
|
|
|
pydantic,
|
|
|
|
quantulum3,
|
|
|
|
rank-bm25,
|
|
|
|
requests,
|
|
|
|
requests-cache,
|
|
|
|
scikit-learn,
|
|
|
|
sseclient-py,
|
|
|
|
tenacity,
|
|
|
|
tiktoken,
|
|
|
|
tqdm,
|
|
|
|
transformers,
|
|
|
|
openai-whisper,
|
|
|
|
boto3,
|
|
|
|
botocore,
|
|
|
|
# , beir
|
|
|
|
selenium,
|
|
|
|
coverage,
|
|
|
|
dulwich,
|
|
|
|
# , jupytercontrib
|
|
|
|
mkdocs,
|
|
|
|
mypy,
|
|
|
|
pre-commit,
|
|
|
|
psutil,
|
|
|
|
# , pydoc-markdown
|
|
|
|
pylint,
|
|
|
|
pytest,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-cov,
|
|
|
|
# , pytest-custom-exit-code
|
|
|
|
python-multipart,
|
|
|
|
reno,
|
|
|
|
responses,
|
|
|
|
toml,
|
|
|
|
tox,
|
|
|
|
watchdog,
|
|
|
|
elastic-transport,
|
|
|
|
elasticsearch,
|
|
|
|
# , azure-ai-formrecognizer
|
|
|
|
beautifulsoup4,
|
|
|
|
markdown,
|
|
|
|
python-docx,
|
|
|
|
python-frontmatter,
|
|
|
|
python-magic,
|
|
|
|
tika,
|
|
|
|
black,
|
|
|
|
huggingface-hub,
|
|
|
|
sentence-transformers,
|
|
|
|
mlflow,
|
|
|
|
rapidfuzz,
|
|
|
|
scipy,
|
|
|
|
seqeval,
|
|
|
|
pdf2image,
|
|
|
|
pytesseract,
|
|
|
|
faiss,
|
|
|
|
# , faiss-gpu
|
|
|
|
pinecone-client,
|
|
|
|
onnxruntime,
|
|
|
|
onnxruntime-tools,
|
|
|
|
# , onnxruntime-gpu
|
|
|
|
opensearch-py,
|
|
|
|
pymupdf,
|
|
|
|
langdetect,
|
|
|
|
nltk,
|
|
|
|
canals,
|
|
|
|
jinja2,
|
|
|
|
openai,
|
|
|
|
aiorwlock,
|
|
|
|
ray,
|
|
|
|
psycopg2,
|
|
|
|
sqlalchemy,
|
|
|
|
sqlalchemy-utils,
|
|
|
|
weaviate-client,
|
2023-11-16 04:20:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-07-27 06:49:29 +00:00
|
|
|
pname = "haystack-ai";
|
|
|
|
version = "2.2.3";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "deepset-ai";
|
|
|
|
repo = "haystack";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-vaZ8bn36Eezf3/SnJ6ao0CvFZaHrpgbX+nM0IOqG2oo=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRemoveDeps = [
|
|
|
|
# We call it faiss, not faiss-cpu.
|
|
|
|
"faiss-cpu"
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
boilerpy3
|
|
|
|
events
|
|
|
|
httpx
|
|
|
|
jsonschema
|
|
|
|
lazy-imports
|
|
|
|
more-itertools
|
|
|
|
networkx
|
|
|
|
pandas
|
|
|
|
pillow
|
|
|
|
platformdirs
|
|
|
|
posthog
|
|
|
|
prompthub-py
|
|
|
|
pydantic
|
|
|
|
quantulum3
|
|
|
|
rank-bm25
|
|
|
|
requests
|
|
|
|
requests-cache
|
|
|
|
scikit-learn
|
|
|
|
sseclient-py
|
|
|
|
tenacity
|
|
|
|
tiktoken
|
|
|
|
tqdm
|
|
|
|
transformers
|
|
|
|
];
|
|
|
|
|
|
|
|
env.HOME = "$(mktemp -d)";
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2023-11-16 04:20:00 +00:00
|
|
|
# all = [
|
|
|
|
# farm-haystack
|
|
|
|
# ];
|
|
|
|
# all-gpu = [
|
|
|
|
# farm-haystack
|
|
|
|
# ];
|
2024-06-05 15:53:02 +00:00
|
|
|
audio = [ openai-whisper ];
|
2023-11-16 04:20:00 +00:00
|
|
|
aws = [
|
|
|
|
boto3
|
|
|
|
botocore
|
|
|
|
];
|
|
|
|
# beir = [
|
|
|
|
# beir
|
|
|
|
# ];
|
2024-06-05 15:53:02 +00:00
|
|
|
colab = [ pillow ];
|
|
|
|
crawler = [ selenium ];
|
2023-11-16 04:20:00 +00:00
|
|
|
dev = [
|
|
|
|
coverage
|
|
|
|
dulwich
|
|
|
|
# jupytercontrib
|
|
|
|
mkdocs
|
|
|
|
mypy
|
|
|
|
pre-commit
|
|
|
|
psutil
|
|
|
|
# pydoc-markdown
|
|
|
|
pylint
|
|
|
|
pytest
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-cov
|
|
|
|
# pytest-custom-exit-code
|
|
|
|
python-multipart
|
|
|
|
reno
|
|
|
|
responses
|
|
|
|
toml
|
|
|
|
tox
|
|
|
|
watchdog
|
|
|
|
];
|
|
|
|
elasticsearch7 = [
|
|
|
|
elastic-transport
|
|
|
|
elasticsearch
|
|
|
|
];
|
|
|
|
elasticsearch8 = [
|
|
|
|
elastic-transport
|
|
|
|
elasticsearch
|
|
|
|
];
|
|
|
|
file-conversion = [
|
|
|
|
# azure-ai-formrecognizer
|
|
|
|
beautifulsoup4
|
|
|
|
markdown
|
|
|
|
python-docx
|
|
|
|
python-frontmatter
|
|
|
|
python-magic
|
|
|
|
# python-magic-bin
|
|
|
|
tika
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
formatting = [ black ];
|
2023-11-16 04:20:00 +00:00
|
|
|
inference = [
|
|
|
|
huggingface-hub
|
|
|
|
sentence-transformers
|
|
|
|
transformers
|
|
|
|
];
|
|
|
|
metrics = [
|
|
|
|
mlflow
|
|
|
|
rapidfuzz
|
|
|
|
scipy
|
|
|
|
seqeval
|
|
|
|
];
|
|
|
|
ocr = [
|
|
|
|
pdf2image
|
|
|
|
pytesseract
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
only-faiss = [ faiss ];
|
2023-11-16 04:20:00 +00:00
|
|
|
# only-faiss-gpu = [
|
|
|
|
# faiss-gpu
|
|
|
|
# ];
|
2024-06-05 15:53:02 +00:00
|
|
|
only-pinecone = [ pinecone-client ];
|
2023-11-16 04:20:00 +00:00
|
|
|
onnx = [
|
|
|
|
onnxruntime
|
|
|
|
onnxruntime-tools
|
|
|
|
];
|
|
|
|
# onnx-gpu = [
|
|
|
|
# onnxruntime-gpu
|
|
|
|
# onnxruntime-tools
|
|
|
|
# ];
|
2024-06-05 15:53:02 +00:00
|
|
|
opensearch = [ opensearch-py ];
|
|
|
|
pdf = [ pymupdf ];
|
2023-11-16 04:20:00 +00:00
|
|
|
preprocessing = [
|
|
|
|
langdetect
|
|
|
|
nltk
|
|
|
|
];
|
|
|
|
preview = [
|
|
|
|
canals
|
|
|
|
jinja2
|
|
|
|
lazy-imports
|
|
|
|
openai
|
|
|
|
pandas
|
|
|
|
rank-bm25
|
|
|
|
requests
|
|
|
|
tenacity
|
|
|
|
tqdm
|
|
|
|
];
|
|
|
|
ray = [
|
|
|
|
aiorwlock
|
|
|
|
ray
|
|
|
|
];
|
|
|
|
sql = [
|
|
|
|
psycopg2
|
|
|
|
sqlalchemy
|
|
|
|
sqlalchemy-utils
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
weaviate = [ weaviate-client ];
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# the setup for test is intensive, hopefully can be done at some point
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "haystack" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "LLM orchestration framework to build customizable, production-ready LLM applications";
|
|
|
|
longDescription = ''
|
2024-06-05 15:53:02 +00:00
|
|
|
LLM orchestration framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data. With advanced retrieval methods, it's best suited for building RAG, question answering, semantic search or conversational agent chatbots
|
2023-11-16 04:20:00 +00:00
|
|
|
'';
|
2024-09-19 14:19:46 +00:00
|
|
|
changelog = "https://github.com/deepset-ai/haystack/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
|
2023-11-16 04:20:00 +00:00
|
|
|
homepage = "https://github.com/deepset-ai/haystack";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ happysalada ];
|
2024-01-13 08:15:51 +00:00
|
|
|
# https://github.com/deepset-ai/haystack/issues/5304
|
|
|
|
broken = versionAtLeast pydantic.version "2";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
}
|