From 74d8a81299d12f884d0cd52ed831886511dd3bab Mon Sep 17 00:00:00 2001 From: artemiyatcohere Date: Fri, 13 Dec 2024 14:17:08 +0000 Subject: [PATCH] Revert "Add asset_type field to the assets structures (#60)" This reverts commit 3a5d494a3b5c9389854de3897b0d5b1981340d0b. --- cohere/compass/models/documents.py | 13 ------------- cohere/compass/models/search.py | 3 --- 2 files changed, 16 deletions(-) diff --git a/cohere/compass/models/documents.py b/cohere/compass/models/documents.py index 585e589..daf1933 100644 --- a/cohere/compass/models/documents.py +++ b/cohere/compass/models/documents.py @@ -22,20 +22,7 @@ class CompassDocumentMetadata(ValidatedModel): parent_document_id: str = "" -class AssetType(str, Enum): - def __str__(self) -> str: - return self.value - - # A page that has been rendered as an image - PAGE_IMAGE = "page_image" - # A Markdown representation of a page's content - PAGE_MARKDOWN = "page_markdown" - # A dump of the text extracted from a document - DOCUMENT_TEXT = "document_text" - - class CompassDocumentChunkAsset(BaseModel): - asset_type: AssetType content_type: str asset_data: str diff --git a/cohere/compass/models/search.py b/cohere/compass/models/search.py index 8fe847a..9cbd8b2 100644 --- a/cohere/compass/models/search.py +++ b/cohere/compass/models/search.py @@ -5,11 +5,8 @@ # 3rd party imports from pydantic import BaseModel -from cohere.compass.models.documents import AssetType - class AssetInfo(BaseModel): - asset_type: AssetType content_type: str presigned_url: str