create_file
- file (BytesIO): A BytesIO object representing the contents of the file.
- filename (str): The name of the file.
create_file_from_raw_bytes
- raw_bytes (bytes): The raw bytes content of the file.
- filename (str): The name of the file.
File
- name (str): The name of the file.
- file_id (str): The unique identifier of the file.
- metadata (Dict[str, Any], optional): Additional metadata associated with the file. Defaults to None.
- docs (List[Dict[str, Any]], optional): A list of documents contained within the file. Defaults to None.
- raw_bytes (bytes, optional): The raw bytes content of the file. Defaults to b"".
init
from_bytes
- file (BytesIO): A BytesIO object representing the contents of the file.
- filename (str): The name of the file.
from_raw_bytes
- raw_bytes (bytes): The raw bytes content of the file.
- filename (str): The name of the file.
repr
str
copy
strip_consecutive_newlines
- text (str): The string to strip.
DocxFile
from_bytes
- file (BytesIO): A BytesIO object representing the contents of the docx file.
- filename (str): The name of the file.
PdfFile
from_bytes
- file (BytesIO): A BytesIO object representing the contents of the pdf file.
- filename (str): The name of the file.
TxtFile
from_bytes
- file (BytesIO): A BytesIO object representing the contents of the txt file.
- filename (str): The name of the file.
JsonFile
from_bytes
- file (BytesIO): A BytesIO object representing the contents of the json file.
- filename (str): The name of the file.
HtmlFile
from_bytes
- file (BytesIO): A BytesIO object representing the contents of the html file.
- filename (str): The name of the file.