Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/vectara/managers/document.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from vectara.documents.client import DocumentsClient
from vectara.types import Document, CoreDocument, StructuredDocument
from vectara.types import Document, CreateDocumentRequest_Core, CreateDocumentRequest_Structured
from vectara.utils.hash import calculate_sha256
from typing import Optional, Dict, Any, Union, Tuple
from enum import Enum
Expand Down Expand Up @@ -90,7 +90,7 @@ def check_same(self, corpus_key: str, doc_id: str, content: bytes, metadata: Opt
return True, True


def index_doc(self, corpus_key: str, doc: Union[CoreDocument, StructuredDocument]) -> DocOpEnum:
def index_doc(self, corpus_key: str, doc: Union[CreateDocumentRequest_Core, CreateDocumentRequest_Structured]) -> DocOpEnum:

# Remove the sha256 hash from metadata.
if doc.metadata and HASH_FIELD in doc.metadata:
Expand Down
Loading