SearchFlow
SearchFlow is an assistant designed to help you index webpages into structured datasets. It leverages various tools and models to scrape, process, and store web content efficiently.
Features
- Web Scraping: Uses
trafilaturafor focused crawling and web scraping. - Document Processing: Supports chunking and processing of various document types.
- Database Management: Manages projects, documents, and prompts using PostgreSQL.
- Vector Search: Utilizes vector search for document retrieval.
- LLM Integration: Integrates with language models for question answering and document grading.
Installation
To set up the development environment, use the provided Dockerfile and .devcontainer/devcontainer.json for a consistent development setup.
Prerequisites
- Docker
- Python 3.11 or higher
Steps
Usage
Install SearchFlow via pip:
pip install searchflow
Quickstart
- Initialize the Database
from searchflow.db.postgresql import DB
db = DB()
db.create_project(project_name="example_project")
- Create a project
db.create_project(project_name="example_project")
- Import Data from a URL
from searchflow.importers import WebScraper
scraper = WebScraper(project_name='MyProject', db=db)
scraper.full_import("https://example.com", max_pages=100)
- ** Upload a file to the project **
from searchflow.importers import Files
with open("path/to/your/file.pdf", "rb") as f:
bytes_data = f.read()
files = Files()
files.upload_file(
document_data=[(bytes_data, "file.pdf")],
project_name="MyProject",
inference_type="local"
)
- List Files in a Project
files.list_files(project_name="MyProject")
- Remove a File from a Project
files.remove_file(project_name="MyProject", file_name="file.pdf")
Question Answering
Vector Search
To perform a similarity search:
from searchflow.db.postgresql import DB
db = DB()
results = db.similarity_search(project_name="example_project", query="example query"
Metadata
Release files for searchflow 0.0.111
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| searchflow-0.0.111.tar.gz | 33.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| searchflow-0.0.111-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.7 kB
Release files / searchflow-0.0.111.tar.gz
| Download URL | searchflow-0.0.111.tar.gz |
|---|---|
| Size | 33.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dde33cd007a8c56babc12bf973759a0f1e5a617fc6dc89fe8505b1b0b6116e7f
|
|
BLAKE2b-256 checksum How to use checksums |
78c55b747bfe7c1f5059d066d268fa7037e7980c6ab3ed54e78a9bddb114fda9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Linux/6.5.0-1025-azure
|
Release files / searchflow-0.0.111-py3-none-any.whl
| Download URL | searchflow-0.0.111-py3-none-any.whl |
|---|---|
| Size | 41.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8fabd2cad973a663b4386aad11595cd9f59146d624ad3d0009193d112ad82fcc
|
|
BLAKE2b-256 checksum How to use checksums |
4436cc6c73b5e3633563f6a3c148d91416726a03cb61a761ddf9020d4203e724
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Linux/6.5.0-1025-azure
|