52 references to new
Microsoft.Extensions.AI.Abstractions (2)
Files\HostedFileClientExtensions.cs (1)
160
options = options?.Clone() ??
new
();
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.HostedFileClientOptions.g.cs (1)
33
ObjectCreator = () => new global::Microsoft.Extensions.AI.
HostedFileClientOptions
(),
Microsoft.Extensions.AI.Abstractions.Tests (10)
Files\DelegatingHostedFileClientTests.cs (5)
29
var expectedOptions = new
HostedFileClientOptions
();
58
var expectedOptions = new
HostedFileClientOptions
();
85
var expectedOptions = new
HostedFileClientOptions
();
111
var expectedOptions = new
HostedFileClientOptions
();
143
var expectedOptions = new
HostedFileClientOptions
();
Files\HostedFileClientExtensionsTests.cs (1)
342
var explicitOptions = new
HostedFileClientOptions
{ Scope = "container-from-options" };
Files\HostedFileClientOptionsTests.cs (3)
17
var options = new
HostedFileClientOptions
();
37
var options = new
HostedFileClientOptions
129
HostedFileClientOptions options =
new
()
Generated\361d1da7f942c932\TestJsonSerializerContext.HostedFileClientOptions.g.cs (1)
31
ObjectCreator = () => new global::Microsoft.Extensions.AI.
HostedFileClientOptions
(),
Microsoft.Extensions.AI.OpenAI.Tests (32)
OpenAIHostedFileClientIntegrationTests.cs (15)
40
var uploadedFile = await _client!.UploadAsync(uploadStream, "application/jsonl", fileName, new
HostedFileClientOptions
{ Purpose = "fine-tune" });
94
var uploadedFile = await _client!.UploadAsync(uploadStream, "text/plain", fileName, new
HostedFileClientOptions
{ Purpose = "assistants" });
98
await foreach (var file in _client.ListFilesAsync(new
HostedFileClientOptions
{ Purpose = "assistants" }))
126
var uploadedFile = await _client!.UploadAsync(uploadStream, "text/plain", fileName, new
HostedFileClientOptions
{ Purpose = "assistants" });
179
var uploadedFile = await _client!.UploadAsync(dataContent, new
HostedFileClientOptions
{ Purpose = "assistants" });
208
var uploadedFile = await _client!.UploadAsync(uploadStream, "application/jsonl", fileName, new
HostedFileClientOptions
{ Purpose = "fine-tune" });
238
var uploadedFile = await _client!.UploadAsync(uploadStream, "application/jsonl", fileName, new
HostedFileClientOptions
{ Purpose = "fine-tune" });
302
new
HostedFileClientOptions
{ Scope = containerId });
310
await foreach (var file in containerClient.ListFilesAsync(new
HostedFileClientOptions
{ Scope = containerId }))
318
var fileInfo = await containerClient.GetFileInfoAsync(uploadedFile.FileId, new
HostedFileClientOptions
{ Scope = containerId });
323
using var downloadStream = await containerClient.DownloadAsync(uploadedFile.FileId, new
HostedFileClientOptions
{ Scope = containerId });
330
bool deleted = await containerClient.DeleteAsync(uploadedFile.FileId, new
HostedFileClientOptions
{ Scope = containerId });
368
await foreach (var file in fileClient.ListFilesAsync(new
HostedFileClientOptions
{ Scope = containerId }))
377
using var downloadStream = await fileClient.DownloadAsync(firstFile, new
HostedFileClientOptions
{ Scope = containerId });
419
new
HostedFileClientOptions
{ Scope = containerId });
OpenAIHostedFileClientTests.cs (17)
149
var result = await client.UploadAsync(stream, options: new
HostedFileClientOptions
{ Purpose = "fine-tune" });
297
var files = await CollectAsync(client.ListFilesAsync(new
HostedFileClientOptions
{ Limit = 2 }));
318
var files = await CollectAsync(client.ListFilesAsync(new
HostedFileClientOptions
{ Purpose = "assistants" }));
383
() => client.UploadAsync(stream, options: new
HostedFileClientOptions
{ Scope = "container-123" }));
393
() => client.DownloadAsync("file-abc123", new
HostedFileClientOptions
{ Scope = "container-123" }));
403
() => client.GetFileInfoAsync("file-abc123", new
HostedFileClientOptions
{ Scope = "container-123" }));
413
async () => await CollectAsync(client.ListFilesAsync(new
HostedFileClientOptions
{ Scope = "container-123" })));
423
() => client.DeleteAsync("file-abc123", new
HostedFileClientOptions
{ Scope = "container-123" }));
662
var result = await client.UploadAsync(contentStream, "text/csv", "data.csv", new
HostedFileClientOptions
{ Scope = "ctr-123" });
687
await client.UploadAsync(contentStream, "text/csv", "data.csv", new
HostedFileClientOptions
{ Scope = "ctr-123" });
716
using var stream = await client.DownloadAsync("cfile-1", new
HostedFileClientOptions
{ Scope = "ctr-123" });
743
var result = await client.GetFileInfoAsync("cfile-1", new
HostedFileClientOptions
{ Scope = "ctr-123" });
758
var result = await client.GetFileInfoAsync("cfile-nonexistent", new
HostedFileClientOptions
{ Scope = "ctr-123" });
785
var files = await CollectAsync(client.ListFilesAsync(new
HostedFileClientOptions
{ Scope = "ctr-123" }));
809
var result = await client.DeleteAsync("cfile-1", new
HostedFileClientOptions
{ Scope = "ctr-123" });
821
var result = await client.DeleteAsync("cfile-nonexistent", new
HostedFileClientOptions
{ Scope = "ctr-123" });
872
var result = await client.UploadAsync(contentStream, "text/csv", "data.csv", new
HostedFileClientOptions
Microsoft.Extensions.AI.Tests (8)
Files\LoggingHostedFileClientTests.cs (1)
70
await client.UploadAsync(stream, "text/plain", "test.txt", new
HostedFileClientOptions
{ Purpose = "assistants" });
Files\OpenTelemetryHostedFileClientTests.cs (7)
51
await client.UploadAsync(stream, "text/plain", "test.txt", new
HostedFileClientOptions
{ Purpose = "assistants", Scope = "container-1" });
103
using var stream = await client.DownloadAsync("file-xyz", new
HostedFileClientOptions
{ Scope = "container-2" });
143
await client.GetFileInfoAsync("file-info", new
HostedFileClientOptions
{ Scope = "container-3" });
198
await foreach (var file in client.ListFilesAsync(new
HostedFileClientOptions
{ Purpose = "assistants", Scope = "container-4" }))
239
await client.DeleteAsync("file-del", new
HostedFileClientOptions
{ Scope = "container-5" });
547
await client.UploadAsync(stream, options: new
HostedFileClientOptions
584
await client.UploadAsync(stream, options: new
HostedFileClientOptions