Skip to content

Commit 79134b8

Browse files
Renamed packages for NuGet release (Azure#49168)
* prepared packages for release to NuGet * removed mcp client sample * sample renames * cleanup * cleanup * simplified vectorbase APIs * renames * renames * cleanup * updates api files * namespace cleanup * updated ci
1 parent 2a76f5f commit 79134b8

File tree

111 files changed

+731
-979
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+731
-979
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public ClientConnection GetConnection(string connectionId)
4646
ConnectionType connectionType = GetConnectionTypeFromId(connectionId);
4747

4848
// 2) Check cache
49-
ConnectionResponse? response;
49+
ConnectionResponse response;
5050
_cacheLock.EnterReadLock();
5151
try
5252
{
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace Azure.Projects.AIFoundry
1616
/// </summary>
1717
public class AIProjectFeature : AzureProjectFeature
1818
{
19-
private string? _connectionString;
19+
private string _connectionString;
2020

2121
/// <summary>
2222
/// Initializes a new instance of the <see cref="AIProjectFeature"/> class.
@@ -44,6 +44,9 @@ public AIProjectFeature()
4444
{
4545
}
4646

47+
/// <summary>
48+
/// Returns the connection string for the AI Project endpoint.
49+
/// </summary>
4750
public List<ClientConnection> Connections { get; set; } = new List<ClientConnection>();
4851

4952
private void EmitConnections(ICollection<ClientConnection> connections, string cmId)
@@ -72,7 +75,7 @@ private void EmitConnections(ICollection<ClientConnection> connections, string
7275
/// Emit any necessary resources for provisioning (currently no-op).
7376
/// </summary>
7477
/// <param name="infrastructure">The ProjectInfrastructure context.</param>
75-
protected internal override void EmitConstructs(ProjectInfrastructure infrastructure)
78+
protected override void EmitConstructs(ProjectInfrastructure infrastructure)
7679
{
7780
var cmId = infrastructure.ProjectId;
7881
AIFoundryHubCdk hub = new($"ai_hub", $"{cmId}_hub");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public AIFoundryHubCdk(string bicepIdentifier, string name)
6666

6767
public string FriendlyName { get; set; }
6868

69-
public UserAssignedIdentity? Identity { get; set; }
69+
public UserAssignedIdentity Identity { get; set; }
7070

7171
protected override IEnumerable<BicepStatement> Compile()
7272
{
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<LangVersion>latest</LangVersion>
6+
<Nullable>disable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Azure.AI.Projects" />
11+
<PackageReference Include="Azure.Identity" />
12+
<PackageReference Include="Azure.Provisioning" />
13+
<PackageReference Include="System.ClientModel" VersionOverride="1.4.0-beta.1" />
14+
</ItemGroup>
15+
16+
<ItemGroup>
17+
<ProjectReference Include="..\Azure.Projects\src\Azure.Projects.csproj" />
18+
<ProjectReference Include="..\Azure.Projects.Provisioning\src\Azure.Projects.Provisioning.csproj" />
19+
</ItemGroup>
20+
</Project>
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
namespace Azure.AI.Models
22
{
3+
public static partial class AIModelsExtensions
4+
{
5+
public static Azure.AI.Models.ModelsClient GetModelsClient(this System.ClientModel.Primitives.ConnectionProvider provider, string? deploymentName = null) { throw null; }
6+
}
37
public partial class ModelsClient
48
{
59
protected ModelsClient() { }
@@ -13,14 +17,10 @@ public ModelsClient(System.Uri endpoint, System.ClientModel.ApiKeyCredential cre
1317
}
1418
namespace Azure.AI.OpenAI
1519
{
16-
public static partial class AIServicesExtensions
17-
{
18-
public static Azure.AI.Models.ModelsClient GetModelsClient(this System.ClientModel.Primitives.ConnectionProvider provider, string? deploymentName = null) { throw null; }
19-
}
2020
public static partial class AzureOpenAIExtensions
2121
{
2222
public static void Add(this System.Collections.Generic.List<OpenAI.Chat.ChatMessage> messages, OpenAI.Chat.ChatCompletion completion) { }
23-
public static void Add(this System.Collections.Generic.List<OpenAI.Chat.ChatMessage> messages, System.Collections.Generic.IEnumerable<Azure.Projects.OpenAI.VectorbaseEntry> entries) { }
23+
public static void Add(this System.Collections.Generic.List<OpenAI.Chat.ChatMessage> messages, System.Collections.Generic.IEnumerable<Azure.Projects.AI.VectorbaseEntry> entries) { }
2424
public static void Add(this System.Collections.Generic.List<OpenAI.Chat.ChatMessage> messages, System.Collections.Generic.IEnumerable<OpenAI.Chat.ToolChatMessage> toolCallResults) { }
2525
public static string AsText(this OpenAI.Chat.ChatCompletion completion) { throw null; }
2626
public static string AsText(this OpenAI.Chat.ChatMessageContent content) { throw null; }
@@ -30,24 +30,44 @@ public static void Add(this System.Collections.Generic.List<OpenAI.Chat.ChatMess
3030
public static void Trim(this System.Collections.Generic.List<OpenAI.Chat.ChatMessage> messages) { }
3131
}
3232
}
33-
namespace Azure.Projects.OpenAI
33+
namespace Azure.Projects
3434
{
3535
public enum AIModelKind
3636
{
3737
Chat = 0,
3838
Embedding = 1,
3939
}
40-
public partial class AIServicesFeature : Azure.Projects.Core.AzureProjectFeature
40+
public partial class AIModelsFeature : Azure.Projects.Core.AzureProjectFeature
4141
{
42-
public AIServicesFeature(string model, string modelVersion) { }
42+
public AIModelsFeature(string model, string modelVersion) { }
4343
protected override void EmitConstructs(Azure.Projects.ProjectInfrastructure infrastructure) { }
4444
}
45-
public partial class ChatProcessor
45+
public partial class OpenAIChatFeature : Azure.Projects.OpenAIModelFeature
46+
{
47+
public OpenAIChatFeature(string model, string modelVersion) : base (default(string), default(string), default(Azure.Projects.AIModelKind)) { }
48+
}
49+
public partial class OpenAIEmbeddingFeature : Azure.Projects.OpenAIModelFeature
50+
{
51+
public OpenAIEmbeddingFeature(string model, string modelVersion) : base (default(string), default(string), default(Azure.Projects.AIModelKind)) { }
52+
}
53+
public partial class OpenAIModelFeature : Azure.Projects.Core.AzureProjectFeature
54+
{
55+
public OpenAIModelFeature(string model, string modelVersion, Azure.Projects.AIModelKind kind = Azure.Projects.AIModelKind.Chat) { }
56+
public string Model { get { throw null; } }
57+
public string ModelVersion { get { throw null; } }
58+
public System.ClientModel.Primitives.ClientConnection CreateConnection(string cmId) { throw null; }
59+
protected override void EmitConstructs(Azure.Projects.ProjectInfrastructure infrastructure) { }
60+
protected override void EmitFeatures(Azure.Projects.ProjectInfrastructure infrastructure) { }
61+
}
62+
}
63+
namespace Azure.Projects.AI
64+
{
65+
public partial class ChatRunner
4666
{
47-
public ChatProcessor(OpenAI.Chat.ChatClient chat) { }
48-
public ChatProcessor(OpenAI.Chat.ChatClient chat, OpenAI.Embeddings.EmbeddingClient? embeddings, Azure.Projects.OpenAI.ChatTools? tools = null) { }
49-
public Azure.Projects.OpenAI.ChatTools? Tools { get { throw null; } set { } }
50-
public Azure.Projects.OpenAI.EmbeddingsStore? VectorDb { get { throw null; } set { } }
67+
public ChatRunner(OpenAI.Chat.ChatClient chat) { }
68+
public ChatRunner(OpenAI.Chat.ChatClient chat, OpenAI.Embeddings.EmbeddingClient? embeddings) { }
69+
public Azure.Projects.AI.ChatTools Tools { get { throw null; } protected set { } }
70+
public Azure.Projects.AI.EmbeddingsStore? VectorDb { get { throw null; } set { } }
5171
protected virtual OpenAI.Chat.ChatCompletion OnComplete(System.Collections.Generic.List<OpenAI.Chat.ChatMessage> conversation, string prompt) { throw null; }
5272
protected virtual void OnGround(System.Collections.Generic.List<OpenAI.Chat.ChatMessage> conversation, string prompt) { }
5373
protected virtual void OnLength(System.Collections.Generic.List<OpenAI.Chat.ChatMessage> conversation, OpenAI.Chat.ChatCompletion completion) { }
@@ -56,50 +76,44 @@ protected virtual void OnStop(System.Collections.Generic.List<OpenAI.Chat.ChatMe
5676
protected virtual void OnToolError(System.Collections.Generic.List<string> failed, System.Collections.Generic.List<OpenAI.Chat.ChatMessage> conversation, OpenAI.Chat.ChatCompletion completion) { }
5777
public System.Threading.Tasks.Task<OpenAI.Chat.ChatCompletion> TakeTurnAsync(System.Collections.Generic.List<OpenAI.Chat.ChatMessage> conversation, string prompt) { throw null; }
5878
}
79+
public partial class ChatThread : System.Collections.Generic.List<OpenAI.Chat.ChatMessage>
80+
{
81+
public ChatThread() { }
82+
}
5983
public partial class ChatTools
6084
{
85+
public ChatTools() { }
6186
public ChatTools(params System.Type[] tools) { }
6287
public System.Collections.Generic.IList<OpenAI.Chat.ChatTool> Definitions { get { throw null; } }
6388
public void Add(System.Reflection.MethodInfo function) { }
6489
public void Add(System.Type functions) { }
90+
public void AddLocalTools(params System.Type[] tools) { }
6591
public System.Threading.Tasks.Task AddMcpServerAsync(System.Uri serverEndpoint) { throw null; }
6692
public string Call(OpenAI.Chat.ChatToolCall call) { throw null; }
6793
public string Call(string name, object[] arguments) { throw null; }
6894
public System.Collections.Generic.IEnumerable<OpenAI.Chat.ToolChatMessage> CallAll(System.Collections.Generic.IEnumerable<OpenAI.Chat.ChatToolCall> toolCalls) { throw null; }
69-
public System.Threading.Tasks.Task<Azure.Projects.OpenAI.ToolCallResult> CallAllWithErrors(System.Collections.Generic.IEnumerable<OpenAI.Chat.ChatToolCall> toolCalls) { throw null; }
70-
public static implicit operator OpenAI.Chat.ChatCompletionOptions (Azure.Projects.OpenAI.ChatTools tools) { throw null; }
95+
public System.Threading.Tasks.Task<Azure.Projects.AI.ToolCallResult> CallAllWithErrors(System.Collections.Generic.IEnumerable<OpenAI.Chat.ChatToolCall> toolCalls) { throw null; }
96+
public static implicit operator OpenAI.Chat.ChatCompletionOptions (Azure.Projects.AI.ChatTools tools) { throw null; }
7197
public OpenAI.Chat.ChatCompletionOptions ToOptions() { throw null; }
7298
}
73-
public partial class EmbeddingsStore
99+
public abstract partial class EmbeddingsStore
74100
{
75-
public EmbeddingsStore(OpenAI.Embeddings.EmbeddingClient client, Azure.Projects.OpenAI.VectorbaseStore? store = null, int factChunkSize = 1000) { }
101+
protected EmbeddingsStore(OpenAI.Embeddings.EmbeddingClient client, int factChunkSize = 1000) { }
102+
public abstract int Add(Azure.Projects.AI.VectorbaseEntry entry);
76103
public void Add(System.BinaryData data) { }
104+
public abstract void Add(System.Collections.Generic.IReadOnlyList<Azure.Projects.AI.VectorbaseEntry> entry);
77105
public void Add(string text) { }
78-
public System.Collections.Generic.IEnumerable<Azure.Projects.OpenAI.VectorbaseEntry> Find(string text, Azure.Projects.OpenAI.FindOptions? options = null) { throw null; }
106+
public static float CosineSimilarity(System.ReadOnlySpan<float> x, System.ReadOnlySpan<float> y) { throw null; }
107+
public static Azure.Projects.AI.EmbeddingsStore Create(OpenAI.Embeddings.EmbeddingClient client) { throw null; }
108+
public abstract System.Collections.Generic.IEnumerable<Azure.Projects.AI.VectorbaseEntry> Find(System.ReadOnlyMemory<float> vector, Azure.Projects.AI.FindOptions options);
109+
public System.Collections.Generic.IEnumerable<Azure.Projects.AI.VectorbaseEntry> FindRelated(string text, Azure.Projects.AI.FindOptions? options = null) { throw null; }
79110
}
80111
public partial class FindOptions
81112
{
82113
public FindOptions() { }
83114
public int MaxEntries { get { throw null; } set { } }
84115
public float Threshold { get { throw null; } set { } }
85116
}
86-
public partial class OpenAIChatFeature : Azure.Projects.OpenAI.OpenAIModelFeature
87-
{
88-
public OpenAIChatFeature(string model, string modelVersion) : base (default(string), default(string), default(Azure.Projects.OpenAI.AIModelKind)) { }
89-
}
90-
public partial class OpenAIEmbeddingFeature : Azure.Projects.OpenAI.OpenAIModelFeature
91-
{
92-
public OpenAIEmbeddingFeature(string model, string modelVersion) : base (default(string), default(string), default(Azure.Projects.OpenAI.AIModelKind)) { }
93-
}
94-
public partial class OpenAIModelFeature : Azure.Projects.Core.AzureProjectFeature
95-
{
96-
public OpenAIModelFeature(string model, string modelVersion, Azure.Projects.OpenAI.AIModelKind kind = Azure.Projects.OpenAI.AIModelKind.Chat) { }
97-
public string Model { get { throw null; } }
98-
public string ModelVersion { get { throw null; } }
99-
public System.ClientModel.Primitives.ClientConnection CreateConnection(string cmId) { throw null; }
100-
protected override void EmitConstructs(Azure.Projects.ProjectInfrastructure infrastructure) { }
101-
protected override void EmitFeatures(Azure.Projects.ProjectInfrastructure infrastructure) { }
102-
}
103117
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
104118
public partial struct ToolCallResult
105119
{
@@ -119,12 +133,4 @@ public readonly partial struct VectorbaseEntry
119133
public int? Id { get { throw null; } }
120134
public System.ReadOnlyMemory<float> Vector { get { throw null; } }
121135
}
122-
public abstract partial class VectorbaseStore
123-
{
124-
protected VectorbaseStore() { }
125-
public abstract int Add(Azure.Projects.OpenAI.VectorbaseEntry entry);
126-
public abstract void Add(System.Collections.Generic.IReadOnlyList<Azure.Projects.OpenAI.VectorbaseEntry> entry);
127-
public static float CosineSimilarity(System.ReadOnlySpan<float> x, System.ReadOnlySpan<float> y) { throw null; }
128-
public abstract System.Collections.Generic.IEnumerable<Azure.Projects.OpenAI.VectorbaseEntry> Find(System.ReadOnlyMemory<float> vector, Azure.Projects.OpenAI.FindOptions options);
129-
}
130136
}

0 commit comments

Comments
 (0)