All Integrations
LangChain Integration
FoxNoseRetriever — a LangChain BaseRetriever backed by FoxNose Flux search. Drop it into any RAG chain for text, vector, or hybrid retrieval.
Version:LatestLicense:Apache 2.0
Overview
langchain-foxnose provides FoxNoseRetriever, a LangChain BaseRetriever that connects to the FoxNose Flux search API. Use it as a drop-in retriever in any LangChain chain — RetrievalQA, ConversationalRetrievalChain, or your own custom pipeline.
Features
- 4 search modes — text, vector, hybrid, and vector-boosted retrieval
- Content mapping — single field, multiple fields, or a custom mapper function to build
Document.page_content - Metadata control — whitelist, blacklist, or toggle system metadata on returned documents
- Async support — native async retrieval via
AsyncFluxClient - Structured filtering — pass a
whereparameter to filter results before ranking - Convenience constructor —
FoxNoseRetriever.from_client_params()to create a retriever without manually instantiating a client
Installation
pip install langchain-foxnose
Quick Start
from langchain_foxnose import FoxNoseRetriever
retriever = FoxNoseRetriever.from_client_params(
base_url="https://7c9h4pwu.fxns.io",
api_prefix="content",
public_key="YOUR_PUBLIC_KEY",
secret_key="YOUR_SECRET_KEY",
folder="articles",
search_mode="hybrid",
content_field="body",
)
docs = retriever.invoke("how to build AI applications")
for doc in docs:
print(doc.page_content[:200])
Usage Examples
Vector search
retriever = FoxNoseRetriever.from_client_params(
base_url="https://7c9h4pwu.fxns.io",
api_prefix="content",
public_key="YOUR_PUBLIC_KEY",
secret_key="YOUR_SECRET_KEY",
folder="articles",
search_mode="vector",
content_field="body",
top_k=5,
similarity_threshold=0.7,
)
docs = retriever.invoke("latest developments in machine learning")
Hybrid search with custom weights
retriever = FoxNoseRetriever.from_client_params(
base_url="https://7c9h4pwu.fxns.io",
api_prefix="content",
public_key="YOUR_PUBLIC_KEY",
secret_key="YOUR_SECRET_KEY",
folder="articles",
search_mode="hybrid",
content_field="body",
text_search_weight=0.3,
vector_search_weight=0.7,
)
docs = retriever.invoke("quantum computing breakthroughs")
Filtered retrieval
retriever = FoxNoseRetriever.from_client_params(
base_url="https://7c9h4pwu.fxns.io",
api_prefix="content",
public_key="YOUR_PUBLIC_KEY",
secret_key="YOUR_SECRET_KEY",
folder="articles",
search_mode="hybrid",
content_field="body",
where={
"$": {
"all_of": [
{"status__eq": "published"},
{"category__in": ["tech", "science"]},
]
}
},
)
docs = retriever.invoke("renewable energy")
RetrievalQA chain
from langchain_openai import ChatOpenAI
from langchain.chains import RetrievalQA
from langchain_foxnose import FoxNoseRetriever
retriever = FoxNoseRetriever.from_client_params(
base_url="https://7c9h4pwu.fxns.io",
api_prefix="content",
public_key="YOUR_PUBLIC_KEY",
secret_key="YOUR_SECRET_KEY",
folder="articles",
search_mode="hybrid",
content_field="body",
)
qa = RetrievalQA.from_chain_type(
llm=ChatOpenAI(model="gpt-4o"),
retriever=retriever,
)
answer = qa.invoke("What are the best practices for API design?")
print(answer["result"])
Resources
- Full Documentation — Complete reference and guides
- GitHub Repository — Source code and issues
- PyPI Package — Package downloads
- Flux API Reference — Content delivery API docs