Extract text using txtai, docling, docker. Service available via Model Context Protocol (MCP).
/tmp/config/config.yml
# Enable MCP server
mcp: True
# Enable file uploads| from txtai import Agent | |
| agent = Agent( | |
| tools=["http://mcp.server/path"], | |
| model="LLM path" | |
| ) |
Blog: https://qwenlm.github.io/blog/qwq-32b/
Model: https://huggingface.co/Qwen/QwQ-32B
License: Apache 2.0
from txtai import LLM| from txtai import Embeddings | |
| # Start the indexing run | |
| embeddings = Embeddings(content=True) | |
| embeddings.index(stream(), checkpoint="checkpoint dir") | |
| # Elapsed time ⏳ then ⚡💥🔥 | |
| # error, power outage, random failure | |
| # Fix the issue 🧑🔧⚙️ |
| from txtai import Embeddings | |
| embeddings = Embeddings(content=True, graph=True) | |
| embeddings.index(...) | |
| # Standard Vector Search | |
| embeddings.search("vector search query") | |
| # Vector SQL query | |
| embeddings.search(""" |
| from txtai import Embeddings | |
| # In-memory data | |
| data = [{"name":"John", "age": 16}, {"name":"Jon", "age": 45},{"name":"Sarah", "age": 18}] | |
| # Vector embeddings index with content storage | |
| embeddings = Embeddings(content=True, columns={"text": "name"}) | |
| embeddings.index(data) | |
| # Vector similarity |
This example shows how to build an Agent having multiple agents as tools. This "Agent Team" works together to answer questions.
A more basic example can be found here
pip install git+https://github.com/neuml/txtai