from_dict() classmethod.
Document
Represents a document to be processed and indexed.Fields
| Field | Type | Default | Description |
|---|---|---|---|
content | str | required | Text content of the document |
title | Optional[str] | "Untitled Document" | Document title |
tags | Optional[List[str]] | [] | Tags for categorization |
source | Optional[str] | "vrin-sdk" | Source identifier |
user_id | Optional[str] | "default" | Owner user ID |
document_type | str | "text" | Document type |
QueryResult
Represents a single search result from the knowledge base.Fields
| Field | Type | Description |
|---|---|---|
content | str | Retrieved text content |
score | float | Relevance score |
search_type | str | "graph", "vector", or "hybrid" |
metadata | Dict[str, Any] | Document metadata |
chunk_id | str | Unique chunk identifier |
graph_context | Optional[Dict] | Related graph data |
Properties
title— Document title (frommetadata)tags— Document tags (frommetadata)source— Source identifier (frommetadata)
JobStatus
Represents the status of an async processing job (insertion or upload).Fields
| Field | Type | Description |
|---|---|---|
job_id | str | Unique job identifier |
status | str | pending, chunking, extracting, storing, completed, failed |
message | str | Human-readable status message |
progress | int | Progress percentage (0-100) |
timestamp | Optional[int] | Job creation timestamp |
completed_at | Optional[int] | Completion timestamp |
data | Optional[Dict] | Result data (when completed) |
error_details | Optional[str] | Error message (when failed) |
Properties
is_completed—Truewhen status is"completed"is_failed—Truewhen status is"failed"is_processing—Truewhen status is any active statecompletion_time—datetimefromcompleted_atcreation_time—datetimefromtimestamp
InsertResult
Structured response from an insert operation.Fields
| Field | Type | Default | Description |
|---|---|---|---|
success | bool | False | Whether the operation succeeded |
job_id | Optional[str] | None | Async job ID |
facts_extracted | int | 0 | Number of facts extracted |
message | str | "" | Status message |
chunk_id | Optional[str] | None | Chunk identifier |
UploadResult
Structured response from a file upload.Fields
| Field | Type | Default | Description |
|---|---|---|---|
success | bool | False | Whether the upload succeeded |
upload_id | Optional[str] | None | Upload identifier |
filename | Optional[str] | None | Uploaded filename |
status | str | "" | Processing status |
message | str | "" | Status message |
UserLimits
User plan information and usage limits.Fields
| Field | Type | Default | Description |
|---|---|---|---|
plan | str | "free" | Current plan name |
queries_remaining | int | 0 | Queries remaining in billing period |
inserts_remaining | int | 0 | Inserts remaining |
allowed_models | List[str] | [] | Models available on current plan |
max_file_size_mb | int | 10 | Maximum upload file size |
Conversation
Summary of a conversation session.Fields
| Field | Type | Default | Description |
|---|---|---|---|
session_id | str | required | Unique session identifier |
title | str | "" | Conversation title |
created_at | Optional[str] | None | Creation timestamp |
last_updated | Optional[str] | None | Last update timestamp |
turn_count | int | 0 | Number of query-response turns |
preview | str | "" | Preview of the conversation |