Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion DemoApp/Files/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
"dependencies": {
"Google.Apis.Auth": "[1.69.0, )",
"Microsoft.Extensions.AI.Abstractions": "[10.4.0, )",
"MimeTypes": "[2.5.2, )"
"MimeTypes": "[2.5.2, )",
"System.Collections.Immutable": "[9.0.0, )",
"System.Net.ServerSentEvents": "[9.0.0, )"
}
},
"Google.Apis.Auth": {
Expand Down Expand Up @@ -80,6 +82,18 @@
"resolved": "2.5.2",
"contentHash": "vm4xrNt+i6OVRQ8vhfCcmDIUg3qvjyCTkSTNVTDFohsG6CXEpMaVFkidECL6yRYpHDnz4TqXhDoEQAcnHCu/tw=="
},
"System.Collections.Immutable": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w=="
},
"System.Net.ServerSentEvents": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "VTWjeyx9nPb4+hkjGcAaDw1nOckypMtvABmxSWm6PPYwrXoIiVG3jwtNlAGhaGVjDkBrERABox67wYTAcHxg7Q=="
},
"System.Text.Json": {
"type": "CentralTransitive",
"requested": "[10.0.4, )",
Expand Down
16 changes: 15 additions & 1 deletion DemoApp/GenerateContentSimpleText/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
"dependencies": {
"Google.Apis.Auth": "[1.69.0, )",
"Microsoft.Extensions.AI.Abstractions": "[10.4.0, )",
"MimeTypes": "[2.5.2, )"
"MimeTypes": "[2.5.2, )",
"System.Collections.Immutable": "[9.0.0, )",
"System.Net.ServerSentEvents": "[9.0.0, )"
}
},
"Google.Apis.Auth": {
Expand Down Expand Up @@ -80,6 +82,18 @@
"resolved": "2.5.2",
"contentHash": "vm4xrNt+i6OVRQ8vhfCcmDIUg3qvjyCTkSTNVTDFohsG6CXEpMaVFkidECL6yRYpHDnz4TqXhDoEQAcnHCu/tw=="
},
"System.Collections.Immutable": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w=="
},
"System.Net.ServerSentEvents": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "VTWjeyx9nPb4+hkjGcAaDw1nOckypMtvABmxSWm6PPYwrXoIiVG3jwtNlAGhaGVjDkBrERABox67wYTAcHxg7Q=="
},
"System.Text.Json": {
"type": "CentralTransitive",
"requested": "[10.0.4, )",
Expand Down
16 changes: 15 additions & 1 deletion DemoApp/GenerateContentStreamSimpleText/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
"dependencies": {
"Google.Apis.Auth": "[1.69.0, )",
"Microsoft.Extensions.AI.Abstractions": "[10.4.0, )",
"MimeTypes": "[2.5.2, )"
"MimeTypes": "[2.5.2, )",
"System.Collections.Immutable": "[9.0.0, )",
"System.Net.ServerSentEvents": "[9.0.0, )"
}
},
"Google.Apis.Auth": {
Expand Down Expand Up @@ -80,6 +82,18 @@
"resolved": "2.5.2",
"contentHash": "vm4xrNt+i6OVRQ8vhfCcmDIUg3qvjyCTkSTNVTDFohsG6CXEpMaVFkidECL6yRYpHDnz4TqXhDoEQAcnHCu/tw=="
},
"System.Collections.Immutable": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w=="
},
"System.Net.ServerSentEvents": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "VTWjeyx9nPb4+hkjGcAaDw1nOckypMtvABmxSWm6PPYwrXoIiVG3jwtNlAGhaGVjDkBrERABox67wYTAcHxg7Q=="
},
"System.Text.Json": {
"type": "CentralTransitive",
"requested": "[10.0.4, )",
Expand Down
16 changes: 15 additions & 1 deletion DemoApp/JsonParser/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
"dependencies": {
"Google.Apis.Auth": "[1.69.0, )",
"Microsoft.Extensions.AI.Abstractions": "[10.4.0, )",
"MimeTypes": "[2.5.2, )"
"MimeTypes": "[2.5.2, )",
"System.Collections.Immutable": "[9.0.0, )",
"System.Net.ServerSentEvents": "[9.0.0, )"
}
},
"Google.Apis.Auth": {
Expand Down Expand Up @@ -80,6 +82,18 @@
"resolved": "2.5.2",
"contentHash": "vm4xrNt+i6OVRQ8vhfCcmDIUg3qvjyCTkSTNVTDFohsG6CXEpMaVFkidECL6yRYpHDnz4TqXhDoEQAcnHCu/tw=="
},
"System.Collections.Immutable": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w=="
},
"System.Net.ServerSentEvents": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "VTWjeyx9nPb4+hkjGcAaDw1nOckypMtvABmxSWm6PPYwrXoIiVG3jwtNlAGhaGVjDkBrERABox67wYTAcHxg7Q=="
},
"System.Text.Json": {
"type": "CentralTransitive",
"requested": "[10.0.4, )",
Expand Down
16 changes: 15 additions & 1 deletion DemoApp/LiveAudioToAudioRealtimeInput/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
"dependencies": {
"Google.Apis.Auth": "[1.69.0, )",
"Microsoft.Extensions.AI.Abstractions": "[10.4.0, )",
"MimeTypes": "[2.5.2, )"
"MimeTypes": "[2.5.2, )",
"System.Collections.Immutable": "[9.0.0, )",
"System.Net.ServerSentEvents": "[9.0.0, )"
}
},
"Google.Apis.Auth": {
Expand Down Expand Up @@ -80,6 +82,18 @@
"resolved": "2.5.2",
"contentHash": "vm4xrNt+i6OVRQ8vhfCcmDIUg3qvjyCTkSTNVTDFohsG6CXEpMaVFkidECL6yRYpHDnz4TqXhDoEQAcnHCu/tw=="
},
"System.Collections.Immutable": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w=="
},
"System.Net.ServerSentEvents": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "VTWjeyx9nPb4+hkjGcAaDw1nOckypMtvABmxSWm6PPYwrXoIiVG3jwtNlAGhaGVjDkBrERABox67wYTAcHxg7Q=="
},
"System.Text.Json": {
"type": "CentralTransitive",
"requested": "[10.0.4, )",
Expand Down
16 changes: 15 additions & 1 deletion DemoApp/LiveTextToTextClientContent/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
"dependencies": {
"Google.Apis.Auth": "[1.69.0, )",
"Microsoft.Extensions.AI.Abstractions": "[10.4.0, )",
"MimeTypes": "[2.5.2, )"
"MimeTypes": "[2.5.2, )",
"System.Collections.Immutable": "[9.0.0, )",
"System.Net.ServerSentEvents": "[9.0.0, )"
}
},
"Google.Apis.Auth": {
Expand Down Expand Up @@ -80,6 +82,18 @@
"resolved": "2.5.2",
"contentHash": "vm4xrNt+i6OVRQ8vhfCcmDIUg3qvjyCTkSTNVTDFohsG6CXEpMaVFkidECL6yRYpHDnz4TqXhDoEQAcnHCu/tw=="
},
"System.Collections.Immutable": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w=="
},
"System.Net.ServerSentEvents": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "VTWjeyx9nPb4+hkjGcAaDw1nOckypMtvABmxSWm6PPYwrXoIiVG3jwtNlAGhaGVjDkBrERABox67wYTAcHxg7Q=="
},
"System.Text.Json": {
"type": "CentralTransitive",
"requested": "[10.0.4, )",
Expand Down
16 changes: 15 additions & 1 deletion DemoApp/LiveToolCall/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
"dependencies": {
"Google.Apis.Auth": "[1.69.0, )",
"Microsoft.Extensions.AI.Abstractions": "[10.4.0, )",
"MimeTypes": "[2.5.2, )"
"MimeTypes": "[2.5.2, )",
"System.Collections.Immutable": "[9.0.0, )",
"System.Net.ServerSentEvents": "[9.0.0, )"
}
},
"Google.Apis.Auth": {
Expand Down Expand Up @@ -80,6 +82,18 @@
"resolved": "2.5.2",
"contentHash": "vm4xrNt+i6OVRQ8vhfCcmDIUg3qvjyCTkSTNVTDFohsG6CXEpMaVFkidECL6yRYpHDnz4TqXhDoEQAcnHCu/tw=="
},
"System.Collections.Immutable": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w=="
},
"System.Net.ServerSentEvents": {
"type": "CentralTransitive",
"requested": "[9.0.0, )",
"resolved": "9.0.0",
"contentHash": "VTWjeyx9nPb4+hkjGcAaDw1nOckypMtvABmxSWm6PPYwrXoIiVG3jwtNlAGhaGVjDkBrERABox67wYTAcHxg7Q=="
},
"System.Text.Json": {
"type": "CentralTransitive",
"requested": "[10.0.4, )",
Expand Down
14 changes: 7 additions & 7 deletions Google.GenAI.E2E.Tests/Batches/CancelBatchTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class CancelBatchTest
{
private static TestServerProcess? _server;
private Client vertexClient;
private Client enterpriseClient;
private Client geminiClient;
private string modelName;
public TestContext TestContext { get; set; }
Expand Down Expand Up @@ -57,7 +57,7 @@ public void TestInit()
$"{GetType().Name}.{TestContext.TestName}" } },
BaseUrl = "http://localhost:1453"
};
var vertexClientHttpOptions = new HttpOptions {
var enterpriseClientHttpOptions = new HttpOptions {
Headers = new Dictionary<string, string> { { "Test-Name",
$"{GetType().Name}.{TestContext.TestName}" } },
BaseUrl = "http://localhost:1454"
Expand All @@ -68,11 +68,11 @@ public void TestInit()
string location =
System.Environment.GetEnvironmentVariable("GOOGLE_CLOUD_LOCATION") ?? "us-central1";
string apiKey = System.Environment.GetEnvironmentVariable("GOOGLE_API_KEY");
vertexClient = new Client(project: project, location: location, vertexAI: true,
enterpriseClient = new Client(project: project, location: location, enterprise: true,
credential: TestServer.GetCredentialForTestMode(),
httpOptions: vertexClientHttpOptions);
httpOptions: enterpriseClientHttpOptions);
geminiClient =
new Client(apiKey: apiKey, vertexAI: false, httpOptions: geminiClientHttpOptions);
new Client(apiKey: apiKey, enterprise: false, httpOptions: geminiClientHttpOptions);

// Specific setup for this test class
modelName = "gemini-2.5-flash";
Expand All @@ -95,8 +95,8 @@ public async Task CancelBatchJobVertexTest()
Format = "jsonl"
}
};
var response = await vertexClient.Batches.CreateAsync(modelName, src, config);
await vertexClient.Batches.CancelAsync(response.Name);
var response = await enterpriseClient.Batches.CreateAsync(modelName, src, config);
await enterpriseClient.Batches.CancelAsync(response.Name);
}

[TestMethod]
Expand Down
14 changes: 7 additions & 7 deletions Google.GenAI.E2E.Tests/Batches/EmbeddingBatchTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class EmbeddingBatchTest
{
private static TestServerProcess? _server;
private Client vertexClient;
private Client enterpriseClient;
private Client geminiClient;
private string modelName;
public TestContext TestContext { get; set; }
Expand Down Expand Up @@ -58,7 +58,7 @@ public void TestInit()
$"{GetType().Name}.{TestContext.TestName}" } },
BaseUrl = "http://localhost:1453"
};
var vertexClientHttpOptions = new HttpOptions
var enterpriseClientHttpOptions = new HttpOptions
{
Headers = new Dictionary<string, string> { { "Test-Name",
$"{GetType().Name}.{TestContext.TestName}" } },
Expand All @@ -69,11 +69,11 @@ public void TestInit()
string location =
System.Environment.GetEnvironmentVariable("GOOGLE_CLOUD_LOCATION") ?? "us-central1";
string apiKey = System.Environment.GetEnvironmentVariable("GOOGLE_API_KEY");
vertexClient = new Client(project: project, location: location, vertexAI: true,
enterpriseClient = new Client(project: project, location: location, enterprise: true,
credential: TestServer.GetCredentialForTestMode(),
httpOptions: vertexClientHttpOptions);
httpOptions: enterpriseClientHttpOptions);
geminiClient =
new Client(apiKey: apiKey, vertexAI: false, httpOptions: geminiClientHttpOptions);
new Client(apiKey: apiKey, enterprise: false, httpOptions: geminiClientHttpOptions);
// Specific setup for this test class
modelName = "gemini-embedding-001";
}
Expand Down Expand Up @@ -120,7 +120,7 @@ public async Task CreateEmbeddingBatchWithInlinedRequestsVertexTest()
};
await Assert.ThrowsExceptionAsync<NotSupportedException>(async () =>
{
await vertexClient.Batches.CreateEmbeddingsAsync(modelName, src, null);
await enterpriseClient.Batches.CreateEmbeddingsAsync(modelName, src, null);
});
}

Expand Down Expand Up @@ -149,7 +149,7 @@ public async Task CreateEmbeddingBatchWithFileVertexTest()
};
await Assert.ThrowsExceptionAsync<NotSupportedException>(async () =>
{
await vertexClient.Batches.CreateEmbeddingsAsync(modelName, src, null);
await enterpriseClient.Batches.CreateEmbeddingsAsync(modelName, src, null);
});
}
}
Expand Down
14 changes: 7 additions & 7 deletions Google.GenAI.E2E.Tests/Caches/CreateCacheTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public class CreateCacheTest
{
private static TestServerProcess? _server;
private Client vertexClient;
private Client enterpriseClient;
private Client geminiClient;
private string modelName;
public TestContext TestContext { get; set; }
Expand Down Expand Up @@ -60,7 +60,7 @@ public void TestInit()
$"{GetType().Name}.{TestContext.TestName}" } },
BaseUrl = "http://localhost:1453"
};
var vertexClientHttpOptions = new HttpOptions {
var enterpriseClientHttpOptions = new HttpOptions {
Headers = new Dictionary<string, string> { { "Test-Name",
$"{GetType().Name}.{TestContext.TestName}" } },
BaseUrl = "http://localhost:1454"
Expand All @@ -71,11 +71,11 @@ public void TestInit()
string location =
System.Environment.GetEnvironmentVariable("GOOGLE_CLOUD_LOCATION") ?? "us-central1";
string apiKey = System.Environment.GetEnvironmentVariable("GOOGLE_API_KEY");
vertexClient = new Client(project: project, location: location, vertexAI: true,
enterpriseClient = new Client(project: project, location: location, enterprise: true,
credential: TestServer.GetCredentialForTestMode(),
httpOptions: vertexClientHttpOptions);
httpOptions: enterpriseClientHttpOptions);
geminiClient =
new Client(apiKey: apiKey, vertexAI: false, httpOptions: geminiClientHttpOptions);
new Client(apiKey: apiKey, enterprise: false, httpOptions: geminiClientHttpOptions);

// Specific setup for this test class
modelName = "gemini-2.5-flash";
Expand Down Expand Up @@ -108,7 +108,7 @@ public async Task CreateCacheGcsUriVertexTest()
Ttl = "86400s"
};

var vertexResponse = await vertexClient.Caches.CreateAsync(model: modelName, config: config);
var vertexResponse = await enterpriseClient.Caches.CreateAsync(model: modelName, config: config);

Assert.IsNotNull(vertexResponse);
Assert.IsNotNull(vertexResponse.Name);
Expand Down Expand Up @@ -186,7 +186,7 @@ public async Task CreateCacheGoogleAiFileVertexTest()
};

await Assert.ThrowsExceptionAsync<ServerError>(async () => {
await vertexClient.Caches.CreateAsync(model: modelName, config: config);
await enterpriseClient.Caches.CreateAsync(model: modelName, config: config);
});
}
}
Loading
Loading