Data Classes

There are two data classes used in deepset Cloud 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 Cloud. 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 Cloud. For usage examples, see Upload files in byte format.

class DeepsetCloudFileBytes:
  def __init__(
    self, 
    file_bytes: bytes, 
    name: str, 
    meta: Optional[Dict[str, Any]] = None
)

Arguments

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