Skip to content

update generated code, add connections + indexes #49476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: feature/azure-ai-projects-1dp
Choose a base branch
from
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>This is the Azure.AI.Projects.OneDP client library for developing .NET applications with rich experience.</Description>
<AssemblyTitle>Microsoft Azure.AI.Projects.OneDP client library</AssemblyTitle>
Expand All @@ -18,6 +18,7 @@
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Azure.Storage.Blobs" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="Azure.AI.Inference" />
</ItemGroup>

<!-- Shared source from Azure.Core -->
Expand Down
350 changes: 175 additions & 175 deletions sdk/ai/Azure.AI.Projects.OneDP/src/Custom/Agent/AgentsClient.cs

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions sdk/ai/Azure.AI.Projects.OneDP/src/Custom/Datasets/Datasets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ public partial class Datasets
/// </summary>
private (BlobContainerClient ContainerClient, string OutputVersion) CreateDatasetAndGetContainerClient(string name, string inputVersion)
{
var pendingUploadResponse = StartPendingUpload(
var pendingUploadResponse = StartPendingUploadVersion(
name,
inputVersion,
new PendingUploadRequest(null, null, PendingUploadType.TemporaryBlobReference, null)
);

string outputVersion = inputVersion;

if (pendingUploadResponse.Value.BlobReferenceForConsumption == null ||
pendingUploadResponse.Value.BlobReferenceForConsumption.Credential?.Type != CredentialType.SAS ||
string.IsNullOrEmpty(pendingUploadResponse.Value.BlobReferenceForConsumption.BlobUri))
{
throw new InvalidOperationException("Invalid blob reference for consumption.");
}
//if (pendingUploadResponse.Value.BlobReferenceForConsumption == null ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is commented code needed?

// pendingUploadResponse.Value.BlobReferenceForConsumption.Credential?.Type != CredentialType.SAS ||
// string.IsNullOrEmpty(pendingUploadResponse.Value.BlobReferenceForConsumption.BlobUri))
//{
// throw new InvalidOperationException("Invalid blob reference for consumption.");
//}

var containerClient = new BlobContainerClient(new Uri(pendingUploadResponse.Value.BlobReferenceForConsumption.BlobUri));
return (containerClient, outputVersion);
Expand All @@ -45,7 +45,8 @@ public DatasetVersion UploadFileAndCreate(string name, string version, string fi
{
if (!File.Exists(filePath))
{
throw new ArgumentException("The provided file does not exist.");
Console.WriteLine($"File path: {filePath}");
throw new ArgumentException($"The provided file does not exist: {filePath}.");
}

var (containerClient, outputVersion) = CreateDatasetAndGetContainerClient(name, version);
Expand Down Expand Up @@ -75,7 +76,8 @@ public DatasetVersion UploadFolderAndCreate(string name, string version, string
{
if (!Directory.Exists(folderPath))
{
throw new ArgumentException("The provided folder does not exist.");
Console.WriteLine($"File path: {folderPath}");
throw new ArgumentException($"The provided folder does not exist: {folderPath}");
}

var (containerClient, outputVersion) = CreateDatasetAndGetContainerClient(name, version);
Expand Down
46 changes: 23 additions & 23 deletions sdk/ai/Azure.AI.Projects.OneDP/src/Custom/Run/RunOutputs.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>
//// <auto-generated/>

#nullable disable
//#nullable disable

using System;
using System.Collections.Generic;
using System.Linq;
//using System;
//using System.Collections.Generic;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here also commented code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check all places

//using System.Linq;

namespace Azure.AI.Projects.OneDP
{
/// <summary> Fields describing the final run outcome, including status, output messages, and usage. </summary>
public partial class RunOutputs
{
}
//namespace Azure.AI.Projects.OneDP
//{
// /// <summary> Fields describing the final run outcome, including status, output messages, and usage. </summary>
// public partial class RunOutputs
// {
// }

/// <summary> Extension methods for RunOutputs. </summary>
public static class RunOutputsExtensions
{
public static IEnumerable<string> GetTextMessages(this RunOutputs runOutputs)
{
return runOutputs.Messages
.SelectMany(chatMsg => chatMsg.Content)
.OfType<TextContent>()
.Select(textContent => textContent.Text);
}
}
}
// /// <summary> Extension methods for RunOutputs. </summary>
// public static class RunOutputsExtensions
// {
// public static IEnumerable<string> GetTextMessages(this RunOutputs runOutputs)
// {
// return runOutputs.Messages
// .SelectMany(chatMsg => chatMsg.Content)
// .OfType<TextContent>()
// .Select(textContent => textContent.Text);
// }
// }
//}

This file was deleted.

69 changes: 0 additions & 69 deletions sdk/ai/Azure.AI.Projects.OneDP/src/Generated/AIContent.cs

This file was deleted.

Loading
Loading