DeepSeekFileStore
Namespace: Vercel.AI.DeepSeek
public sealed class DeepSeekFileStore : IFileStore, IFileStoreUploads images to POST /files with purpose user_data.
Inheritance: object
Implements: IFileStore, IFileStore
Constructors
Section titled “Constructors”DeepSeekFileStore(DeepSeekProvider)
Section titled “DeepSeekFileStore(DeepSeekProvider)”public DeepSeekFileStore(DeepSeekProvider provider)Creates a file store.
Parameters
| Name | Type | Description |
|---|---|---|
provider |
DeepSeekProvider |
Fields
Section titled “Fields”MaxBytes
Section titled “MaxBytes”public const long MaxBytes = 67108864Maximum upload size, 64 MiB.
Value: long
MaxExpirySeconds
Section titled “MaxExpirySeconds”public const int MaxExpirySeconds = 2592000Longest accepted expiry, in seconds.
Value: int
MaxFileNameLength
Section titled “MaxFileNameLength”public const int MaxFileNameLength = 512Maximum filename length.
Value: int
MinExpirySeconds
Section titled “MinExpirySeconds”public const int MinExpirySeconds = 3600Shortest accepted expiry, in seconds.
Value: int
Properties
Section titled “Properties”ExpiresAfterSeconds
Section titled “ExpiresAfterSeconds”public int? ExpiresAfterSeconds { get; set; }When set, sent as expires_after[seconds] with anchor created_at.
Value: int?
Provider
Section titled “Provider”public string Provider { get; }Provider id.
Value: string
SpecificationVersion
Section titled “SpecificationVersion”public string SpecificationVersion { get; }Files specification version.
Value: string
Methods
Section titled “Methods”UploadFileAsync(string, byte[], string, CancellationToken)
Section titled “UploadFileAsync(string, byte[], string, CancellationToken)”public Task<UploadedFile> UploadFileAsync(string fileName, byte[] data, string mediaType, CancellationToken cancellationToken)Uploads a file.
Parameters
| Name | Type | Description |
|---|---|---|
fileName |
string | |
data |
byte[] | |
mediaType |
string | |
cancellationToken |
CancellationToken |
Returns: Task<UploadedFile>
UploadFileAsync(UploadFileCall, CancellationToken)
Section titled “UploadFileAsync(UploadFileCall, CancellationToken)”public Task<UploadFileModelResult> UploadFileAsync(UploadFileCall call, CancellationToken cancellationToken)Uploads inline data. Streams are rejected. deepseek.expiresAfter overrides ExpiresAfterSeconds.
Parameters
| Name | Type | Description |
|---|---|---|
call |
UploadFileCall | |
cancellationToken |
CancellationToken |
Returns: Task<UploadFileModelResult>
Validate(long, string?, string, byte[]?)
Section titled “Validate(long, string?, string, byte[]?)”public static void Validate(long length, string? fileName, string mediaType, byte[]? data)Checks size, filename, media type, and magic bytes before any request is sent.
Parameters
| Name | Type | Description |
|---|---|---|
length |
long | |
fileName |
string | |
mediaType |
string | |
data |
byte[] |
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product