import { APIResource } from "../core/resource.js"; import { APIPromise } from "../core/api-promise.js"; import { RequestOptions } from "../internal/request-options.js"; export declare class Files extends APIResource { /** * Retrieve the metadata for a single uploaded data file. * * @example * ```ts * const fileResponse = await client.files.retrieve('id'); * ``` */ retrieve(id: string, options?: RequestOptions): APIPromise; /** * List the metadata for all uploaded data files. * * @example * ```ts * const fileList = await client.files.list(); * ``` */ list(options?: RequestOptions): APIPromise; /** * Delete a previously uploaded data file. * * @example * ```ts * const file = await client.files.delete('id'); * ``` */ delete(id: string, options?: RequestOptions): APIPromise; /** * Get the contents of a single uploaded data file. * * @example * ```ts * const response = await client.files.content('id'); * * const content = await response.blob(); * console.log(content); * ``` */ content(id: string, options?: RequestOptions): APIPromise; /** * Upload a file. * CUSTOM CODE. DO NOT LET STAINLESS REMOVE. */ upload(file: string, purpose: FilePurpose, check?: boolean): APIPromise; } export interface FileList { data: Array; } /** * The purpose of the file */ export type FilePurpose = 'fine-tune' | 'eval' | 'batch-api'; /** * Structured information describing a file uploaded to Together. */ export interface FileResponse { /** * ID of the file. */ id: string; /** * The number of bytes in the file. */ bytes: number; /** * The timestamp when the file was created. */ created_at: number; /** * The name of the file as it was uploaded. */ filename: string; /** * The type of the file such as `jsonl`, `csv`, or `parquet`. */ FileType: FileType; /** * The object type, which is always `file`. */ object: 'file'; /** * Whether the file has been parsed and analyzed for correctness for fine-tuning. */ Processed: boolean; /** * The purpose of the file as it was uploaded. */ purpose: FilePurpose; } /** * The type of the file */ export type FileType = 'csv' | 'jsonl' | 'parquet'; export interface FileDeleteResponse { id?: string; deleted?: boolean; } export declare namespace Files { export { type FileList as FileList, type FilePurpose as FilePurpose, type FileResponse as FileResponse, type FileType as FileType, type FileDeleteResponse as FileDeleteResponse, }; } //# sourceMappingURL=files.d.ts.map