Shell
Getting Started
# Without authentication (connects to localhost:8000):
python shell.py
# With authentication (using a generated URI):
python shell.py "databridge://user:token@localhost:8000"Basic Usage
# Ingest text content
doc = db.ingest_text(
content="Machine learning is fascinating...",
metadata={"title": "ML Introduction"}
)
print(f"Document ID: {doc['external_id']}")
# Ingest a file
doc = db.ingest_file(
file="research_paper.pdf",
filename="research_paper.pdf",
metadata={"category": "research"}
)
print(f"Document ID: {doc['external_id']}")
# Search for content
chunks = db.retrieve_chunks(
query="What are the key findings?",
filters={"category": "research"},
k=4,
min_score=0.7
)
for chunk in chunks:
print(f"Score: {chunk['score']}")
print(f"Content: {chunk['content']}")
print("---")Features
Getting Help
Shell Tips
Common Tasks
Document Management
Search Operations
Completions
Usage Analytics
Next Steps
Last updated