Skip to main content

Data Classes

There are two data classes used in deepset SDK - DeepsetCloudFile and DeepsetCloudFileBytes. Learn where they are used and what parameters they take.

DeepsetCloudFile

This is a data class for uploading texts to deepset AI Platform. For usage examples, see Upload Files with Python.

class DeepsetCloudFile:
def __init__(
self,
text: str,
name: str,
meta: Optional[Dict[str, Any]] = None
)

Arguments

  • text: The text content of the file to be uploaded.
  • name: The name of the file to be uploaded.
  • meta: The metadata to add to the file.

DeepsetCloudFileBytes

This is a data class for uploading files of any supported type in deepset AI Platform. For usage examples, see Upload Bytes.

Arguments

  • file_bytes: The content of the file represented as bytes.
  • name: The name of the file.
  • meta: The file's metadata.