Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add asset_type field to the assets structures (#60)" #66

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
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
13 changes: 0 additions & 13 deletions cohere/compass/models/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions cohere/compass/models/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading