Client
DataBridge
Main client for document operations in DataBridge
DataBridge
The DataBridge
class is the main client for document operations in DataBridge.
Constructor
Parameters
uri
(str, optional): DataBridge URI in format “databridge://<owner_id>:<token>@<host>”. If not provided, connects to http://localhost:8000 without authentication.timeout
(int, optional): Request timeout in seconds. Defaults to 30.is_local
(bool, optional): Whether connecting to local development server. Defaults to False.
Methods
The DataBridge client provides the following methods for document operations:
- ingest_text
- ingest_file
- retrieve_chunks
- retrieve_docs
- query
- list_documents
- get_document
- get_document_by_filename
- update_document_with_text
- update_document_with_file
- update_document_metadata
- update_document_by_filename_with_text
- update_document_by_filename_with_file
- update_document_by_filename_metadata
- batch_get_documents
- batch_get_chunks
- create_cache
- get_cache
- close
Context Manager
The DataBridge client can be used as a context manager: