Quick guide to start using the Morphik API
npm install morphik
from morphik import Morphik
# Initialize with your URI
client = Morphik("YOUR_COPIED_URI")
# Ingest a file
with open('document.pdf', 'rb') as f:
doc = client.ingest_file(f)
print(f"Document ID: {doc.id}")
from morphik import Morphik
# Initialize with your URI
client = Morphik("YOUR_COPIED_URI")
# Query with RAG
response = client.query(
"What are the key points in this document?",
k=5,
use_colpali=True
)
print(response.answer)
Was this page helpful?