💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Require Python 3.9+, closes #796
davidmezzettibbddcd2a4f31
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 53bf5c8f..c7b9913f 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -15,23 +15,16 @@ jobs:- name: Checkout codeuses: actions/checkout@v3- - name: Install Python - Linux- uses: actions/setup-python@v4- with:- python-version: 3.8- if: matrix.os == 'ubuntu-latest'-- - name: Install Python - macOS/Windows+ - name: Install Pythonuses: actions/setup-python@v4with:python-version: 3.9- if: matrix.os != 'ubuntu-latest'- name: Install Javauses: actions/setup-java@v3with:distribution: "zulu"- java-version: "8"+ java-version: 17- name: Install dependencies - Linuxrun: sudo apt-get update && sudo apt-get install libportaudio2 libsndfile1@@ -54,7 +47,7 @@ jobs:- name: Buildrun: |pip install -U wheel- pip install .[all,dev] fasttext==0.9.2 faiss-cpu==1.8.0 "numpy < 2.0.0"+ pip install .[all,dev]python -c "import nltk; nltk.download(['punkt', 'punkt_tab', 'averaged_perceptron_tagger_eng'])"python --versionmake data coveragediff --git a/.github/workflows/docs.yml b/.github/workflows/docs.ymlindex d38ad2cc..2b970ad1 100644--- a/.github/workflows/docs.yml+++ b/.github/workflows/docs.yml@@ -10,7 +10,7 @@ jobs:- uses: actions/checkout@v3- uses: actions/setup-python@v4with:- python-version: 3.8+ python-version: 3.9- run: |pip install -U pip wheelpip install .[all,dev]diff --git a/README.md b/README.mdindex 04fe93db..d5dfb156 100644--- a/README.md+++ b/README.md@@ -45,7 +45,7 @@ Summary of txtai features:- ⚙️ Build with Python or YAML. API bindings available for [JavaScript](https://github.com/neuml/txtai.js), [Java](https://github.com/neuml/txtai.java), [Rust](https://github.com/neuml/txtai.rs) and [Go](https://github.com/neuml/txtai.go).- ☁️ Run local or scale out with container orchestration-txtai is built with Python 3.8+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi). txtai is open-source under an Apache 2.0 license.+txtai is built with Python 3.9+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi). txtai is open-source under an Apache 2.0 license.*Interested in an easy and secure way to run hosted txtai applications? Then join the [txtai.cloud](https://txtai.cloud) preview to learn more.*@@ -166,7 +166,7 @@ The easiest way to install is via pip and PyPIpip install txtai```-Python 3.8+ is supported. Using a Python [virtual environment](https://docs.python.org/3/library/venv.html) is recommended.+Python 3.9+ is supported. Using a Python [virtual environment](https://docs.python.org/3/library/venv.html) is recommended.See the detailed [install instructions](https://neuml.github.io/txtai/install) for more information covering [optional dependencies](https://neuml.github.io/txtai/install/#optional-dependencies), [environment specific prerequisites](https://neuml.github.io/txtai/install/#environment-specific-prerequisites), [installing from source](https://neuml.github.io/txtai/install/#install-from-source), [conda support](https://neuml.github.io/txtai/install/#conda) and how to [run with containers](https://neuml.github.io/txtai/cloud).diff --git a/docker/base/Dockerfile b/docker/base/Dockerfileindex 73a934a4..b5454483 100644--- a/docker/base/Dockerfile+++ b/docker/base/Dockerfile@@ -1,5 +1,5 @@# Set base image-ARG BASE_IMAGE=ubuntu:20.04+ARG BASE_IMAGE=ubuntu:22.04FROM $BASE_IMAGE# Install GPU-enabled version of PyTorch if set@@ -8,7 +8,7 @@ ARG GPU# Target CPU architectureARG TARGETARCH-# Set Python version (i.e. 3, 3.8)+# Set Python version (i.e. 3, 3.10)ARG PYTHON_VERSION=3# List of txtai components to installdiff --git a/docs/cloud.md b/docs/cloud.mdindex 6b3d9724..c9082a57 100644--- a/docs/cloud.md+++ b/docs/cloud.md@@ -30,8 +30,8 @@ Examples build commands below.# Get Dockerfilewget https://raw.githubusercontent.com/neuml/txtai/master/docker/base/Dockerfile-# Build Ubuntu 20.04 image running Python 3.8-docker build -t txtai --build-arg BASE_IMAGE=ubuntu:20.04 --build-arg PYTHON_VERSION=3.8 .+# Build Ubuntu 22.04 image running Python 3.10+docker build -t txtai --build-arg BASE_IMAGE=ubuntu:22.04 --build-arg PYTHON_VERSION=3.10 .# Build image with GPU supportdocker build -t txtai --build-arg GPU=1 .diff --git a/docs/index.md b/docs/index.mdindex c470a6b7..438dac38 100644--- a/docs/index.md+++ b/docs/index.md@@ -47,6 +47,6 @@ Summary of txtai features:- ⚙️ Build with Python or YAML. API bindings available for [JavaScript](https://github.com/neuml/txtai.js), [Java](https://github.com/neuml/txtai.java), [Rust](https://github.com/neuml/txtai.rs) and [Go](https://github.com/neuml/txtai.go).- ☁️ Run local or scale out with container orchestration-txtai is built with Python 3.8+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi). txtai is open-source under an Apache 2.0 license.+txtai is built with Python 3.9+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi). txtai is open-source under an Apache 2.0 license.*Interested in an easy and secure way to run hosted txtai applications? Then join the [txtai.cloud](https://txtai.cloud) preview to learn more.*diff --git a/docs/install.md b/docs/install.mdindex ee4c6fed..6dd61894 100644--- a/docs/install.md+++ b/docs/install.md@@ -9,7 +9,7 @@ The easiest way to install is via pip and PyPIpip install txtai```-Python 3.8+ is supported. Using a Python [virtual environment](https://docs.python.org/3/library/venv.html) is recommended.+Python 3.9+ is supported. Using a Python [virtual environment](https://docs.python.org/3/library/venv.html) is recommended.## Optional dependencies@@ -153,7 +153,7 @@ pip install txtai torch==[version]+cpu \-f https://download.pytorch.org/whl/torch```-Where `[version]` is the version of PyTorch (such as 2.3.1). The [txtai-cpu](https://hub.docker.com/r/neuml/txtai-cpu) image on Docker Hub uses this method to reduce the image size.+Where `[version]` is the version of PyTorch (such as 2.4.1). The [txtai-cpu](https://hub.docker.com/r/neuml/txtai-cpu) image on Docker Hub uses this method to reduce the image size.## Install from sourcediff --git a/examples/01_Introducing_txtai.ipynb b/examples/01_Introducing_txtai.ipynbindex d8c6a246..c1f9770a 100644--- a/examples/01_Introducing_txtai.ipynb+++ b/examples/01_Introducing_txtai.ipynb@@ -48,7 +48,7 @@"- ⚙️ Build with Python or YAML. API bindings available for [JavaScript](https://github.com/neuml/txtai.js), [Java](https://github.com/neuml/txtai.java), [Rust](https://github.com/neuml/txtai.rs) and [Go](https://github.com/neuml/txtai.go).\n","- ☁️ Run local or scale out with container orchestration\n","\n",- "txtai is built with Python 3.8+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi). txtai is open-source under an Apache 2.0 license."+ "txtai is built with Python 3.9+, [Hugging Face Transformers](https://github.com/huggingface/transformers), [Sentence Transformers](https://github.com/UKPLab/sentence-transformers) and [FastAPI](https://github.com/tiangolo/fastapi). txtai is open-source under an Apache 2.0 license."]},{diff --git a/examples/52_Build_RAG_pipelines_with_txtai.ipynb b/examples/52_Build_RAG_pipelines_with_txtai.ipynbindex d1cc9c94..28ca7356 100644--- a/examples/52_Build_RAG_pipelines_with_txtai.ipynb+++ b/examples/52_Build_RAG_pipelines_with_txtai.ipynb@@ -148,7 +148,7 @@"Install\n","The easiest way to install is via pip and PyPI\n","pip install txtai\n",- "Python 3.8+ is supported. Using a Python virtual environment is recommended.\n",+ "Python 3.9+ is supported. Using a Python virtual environment is recommended.\n","See the detailed install instructions for more information covering optional dependencies, environment specific prerequisites, installing from source, conda support and how to run with containers.\n","\n","\n",@@ -274,7 +274,7 @@"output_type": "execute_result","data": {"text/plain": [- "'The best thing to read to learn about txtai is the \"Introducing txtai\" notebook, which provides an overview of the functionality provided by txtai. This notebook covers various features such as vector search with SQL, object storage, topic modeling, creating embeddings for text, documents, audio, images, and video, and running language model workflows. Additionally, you can explore other example notebooks like \"Similarity search with images,\" \"Build a QA database,\" and \"Semantic Graphs\" to learn more about specific use cases and features. To install txtai, use pip and PyPI with Python 3.8+, and follow the detailed install instructions for more information on optional dependencies and environment-specific prerequisites.'"+ "'The best thing to read to learn about txtai is the \"Introducing txtai\" notebook, which provides an overview of the functionality provided by txtai. This notebook covers various features such as vector search with SQL, object storage, topic modeling, creating embeddings for text, documents, audio, images, and video, and running language model workflows. Additionally, you can explore other example notebooks like \"Similarity search with images,\" \"Build a QA database,\" and \"Semantic Graphs\" to learn more about specific use cases and features. To install txtai, use pip and PyPI with Python 3.9+, and follow the detailed install instructions for more information on optional dependencies and environment-specific prerequisites.'"],"application/vnd.google.colaboratory.intrinsic+json": {"type": "string"@@ -559,8 +559,8 @@"output_type": "stream","name": "stdout","text": [- "ANSWER: Python 3.8+ is supported. Using a Python virtual environment is recommended. The easiest way to install is via pip and PyPI.\n",- "CITATION: [{'id': '24', 'text': 'Python 3.8+ is supported. Using a Python virtual environment is recommended.'}]\n"+ "ANSWER: Python 3.9+ is supported. Using a Python virtual environment is recommended. The easiest way to install is via pip and PyPI.\n",+ "CITATION: [{'id': '24', 'text': 'Python 3.9+ is supported. Using a Python virtual environment is recommended.'}]\n"]}]diff --git a/setup.py b/setup.pyindex 3bff6496..d2d1839f 100644--- a/setup.py+++ b/setup.py@@ -145,7 +145,7 @@ setup(packages=find_packages(where="src/python"),package_dir={"": "src/python"},keywords="search embedding machine-learning nlp",- python_requires=">=3.8",+ python_requires=">=3.9",install_requires=install,extras_require=extras,classifiers=[