Skip to content

Commit 10d7457

Browse files
authored
[AI] [Projects] Add GetThreads API (#49401)
* update commit hash for auto gen * add generated code * update api * fix build
1 parent ceab2cc commit 10d7457

10 files changed

+578
-7
lines changed

sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ public AgentsClient(System.Uri endpoint, string subscriptionId, string resourceG
279279
public virtual Azure.Response<Azure.AI.Projects.AgentThread> GetThread(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
280280
public virtual System.Threading.Tasks.Task<Azure.Response> GetThreadAsync(string threadId, Azure.RequestContext context) { throw null; }
281281
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.AgentThread>> GetThreadAsync(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
282+
public virtual Azure.Response<Azure.AI.Projects.OpenAIPageableListOfAgentThread> GetThreads(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
283+
public virtual Azure.Response GetThreads(int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; }
284+
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.OpenAIPageableListOfAgentThread>> GetThreadsAsync(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
285+
public virtual System.Threading.Tasks.Task<Azure.Response> GetThreadsAsync(int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; }
282286
public virtual Azure.Response GetVectorStore(string vectorStoreId, Azure.RequestContext context) { throw null; }
283287
public virtual Azure.Response<Azure.AI.Projects.VectorStore> GetVectorStore(string vectorStoreId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
284288
public virtual System.Threading.Tasks.Task<Azure.Response> GetVectorStoreAsync(string vectorStoreId, Azure.RequestContext context) { throw null; }
@@ -517,6 +521,7 @@ public static partial class AIProjectsModelFactory
517521
public static Azure.AI.Projects.MessageTextAnnotation MessageTextAnnotation(string type = null, string text = null) { throw null; }
518522
public static Azure.AI.Projects.MessageTextUrlCitationAnnotation MessageTextUrlCitationAnnotation(string text = null, Azure.AI.Projects.MessageTextUrlCitationDetails urlCitation = null, int? startIndex = default(int?), int? endIndex = default(int?)) { throw null; }
519523
public static Azure.AI.Projects.MessageTextUrlCitationDetails MessageTextUrlCitationDetails(string url = null, string title = null) { throw null; }
524+
public static Azure.AI.Projects.OpenAIPageableListOfAgentThread OpenAIPageableListOfAgentThread(Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject @object = default(Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject), System.Collections.Generic.IEnumerable<Azure.AI.Projects.AgentThread> data = null, string firstId = null, string lastId = null, bool hasMore = false) { throw null; }
520525
public static Azure.AI.Projects.RequiredToolCall RequiredToolCall(string type = null, string id = null) { throw null; }
521526
public static Azure.AI.Projects.ResponseFormatJsonSchemaType ResponseFormatJsonSchemaType(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType type = default(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType), Azure.AI.Projects.ResponseFormatJsonSchema jsonSchema = null) { throw null; }
522527
public static Azure.AI.Projects.RunCompletionUsage RunCompletionUsage(long completionTokens = (long)0, long promptTokens = (long)0, long totalTokens = (long)0) { throw null; }
@@ -1699,6 +1704,38 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write
16991704
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.MicrosoftFabricToolDefinition>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
17001705
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.MicrosoftFabricToolDefinition>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
17011706
}
1707+
public partial class OpenAIPageableListOfAgentThread : System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>
1708+
{
1709+
internal OpenAIPageableListOfAgentThread() { }
1710+
public System.Collections.Generic.IReadOnlyList<Azure.AI.Projects.AgentThread> Data { get { throw null; } }
1711+
public string FirstId { get { throw null; } }
1712+
public bool HasMore { get { throw null; } }
1713+
public string LastId { get { throw null; } }
1714+
public Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject Object { get { throw null; } }
1715+
protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
1716+
Azure.AI.Projects.OpenAIPageableListOfAgentThread System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
1717+
void System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
1718+
Azure.AI.Projects.OpenAIPageableListOfAgentThread System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
1719+
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
1720+
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
1721+
}
1722+
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
1723+
public readonly partial struct OpenAIPageableListOfAgentThreadObject : System.IEquatable<Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject>
1724+
{
1725+
private readonly object _dummy;
1726+
private readonly int _dummyPrimitive;
1727+
public OpenAIPageableListOfAgentThreadObject(string value) { throw null; }
1728+
public static Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject List { get { throw null; } }
1729+
public bool Equals(Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject other) { throw null; }
1730+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
1731+
public override bool Equals(object obj) { throw null; }
1732+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
1733+
public override int GetHashCode() { throw null; }
1734+
public static bool operator ==(Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject left, Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject right) { throw null; }
1735+
public static implicit operator Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject (string value) { throw null; }
1736+
public static bool operator !=(Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject left, Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject right) { throw null; }
1737+
public override string ToString() { throw null; }
1738+
}
17021739
public partial class OpenApiAnonymousAuthDetails : Azure.AI.Projects.OpenApiAuthDetails, System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.OpenApiAnonymousAuthDetails>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.OpenApiAnonymousAuthDetails>
17031740
{
17041741
public OpenApiAnonymousAuthDetails() { }

sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ public AgentsClient(System.Uri endpoint, string subscriptionId, string resourceG
279279
public virtual Azure.Response<Azure.AI.Projects.AgentThread> GetThread(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
280280
public virtual System.Threading.Tasks.Task<Azure.Response> GetThreadAsync(string threadId, Azure.RequestContext context) { throw null; }
281281
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.AgentThread>> GetThreadAsync(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
282+
public virtual Azure.Response<Azure.AI.Projects.OpenAIPageableListOfAgentThread> GetThreads(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
283+
public virtual Azure.Response GetThreads(int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; }
284+
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Projects.OpenAIPageableListOfAgentThread>> GetThreadsAsync(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
285+
public virtual System.Threading.Tasks.Task<Azure.Response> GetThreadsAsync(int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; }
282286
public virtual Azure.Response GetVectorStore(string vectorStoreId, Azure.RequestContext context) { throw null; }
283287
public virtual Azure.Response<Azure.AI.Projects.VectorStore> GetVectorStore(string vectorStoreId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
284288
public virtual System.Threading.Tasks.Task<Azure.Response> GetVectorStoreAsync(string vectorStoreId, Azure.RequestContext context) { throw null; }
@@ -517,6 +521,7 @@ public static partial class AIProjectsModelFactory
517521
public static Azure.AI.Projects.MessageTextAnnotation MessageTextAnnotation(string type = null, string text = null) { throw null; }
518522
public static Azure.AI.Projects.MessageTextUrlCitationAnnotation MessageTextUrlCitationAnnotation(string text = null, Azure.AI.Projects.MessageTextUrlCitationDetails urlCitation = null, int? startIndex = default(int?), int? endIndex = default(int?)) { throw null; }
519523
public static Azure.AI.Projects.MessageTextUrlCitationDetails MessageTextUrlCitationDetails(string url = null, string title = null) { throw null; }
524+
public static Azure.AI.Projects.OpenAIPageableListOfAgentThread OpenAIPageableListOfAgentThread(Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject @object = default(Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject), System.Collections.Generic.IEnumerable<Azure.AI.Projects.AgentThread> data = null, string firstId = null, string lastId = null, bool hasMore = false) { throw null; }
520525
public static Azure.AI.Projects.RequiredToolCall RequiredToolCall(string type = null, string id = null) { throw null; }
521526
public static Azure.AI.Projects.ResponseFormatJsonSchemaType ResponseFormatJsonSchemaType(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType type = default(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType), Azure.AI.Projects.ResponseFormatJsonSchema jsonSchema = null) { throw null; }
522527
public static Azure.AI.Projects.RunCompletionUsage RunCompletionUsage(long completionTokens = (long)0, long promptTokens = (long)0, long totalTokens = (long)0) { throw null; }
@@ -1699,6 +1704,38 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write
16991704
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.MicrosoftFabricToolDefinition>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
17001705
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.MicrosoftFabricToolDefinition>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
17011706
}
1707+
public partial class OpenAIPageableListOfAgentThread : System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>
1708+
{
1709+
internal OpenAIPageableListOfAgentThread() { }
1710+
public System.Collections.Generic.IReadOnlyList<Azure.AI.Projects.AgentThread> Data { get { throw null; } }
1711+
public string FirstId { get { throw null; } }
1712+
public bool HasMore { get { throw null; } }
1713+
public string LastId { get { throw null; } }
1714+
public Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject Object { get { throw null; } }
1715+
protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
1716+
Azure.AI.Projects.OpenAIPageableListOfAgentThread System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
1717+
void System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
1718+
Azure.AI.Projects.OpenAIPageableListOfAgentThread System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
1719+
string System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
1720+
System.BinaryData System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.OpenAIPageableListOfAgentThread>.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
1721+
}
1722+
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
1723+
public readonly partial struct OpenAIPageableListOfAgentThreadObject : System.IEquatable<Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject>
1724+
{
1725+
private readonly object _dummy;
1726+
private readonly int _dummyPrimitive;
1727+
public OpenAIPageableListOfAgentThreadObject(string value) { throw null; }
1728+
public static Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject List { get { throw null; } }
1729+
public bool Equals(Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject other) { throw null; }
1730+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
1731+
public override bool Equals(object obj) { throw null; }
1732+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
1733+
public override int GetHashCode() { throw null; }
1734+
public static bool operator ==(Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject left, Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject right) { throw null; }
1735+
public static implicit operator Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject (string value) { throw null; }
1736+
public static bool operator !=(Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject left, Azure.AI.Projects.OpenAIPageableListOfAgentThreadObject right) { throw null; }
1737+
public override string ToString() { throw null; }
1738+
}
17021739
public partial class OpenApiAnonymousAuthDetails : Azure.AI.Projects.OpenApiAuthDetails, System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.OpenApiAnonymousAuthDetails>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.OpenApiAnonymousAuthDetails>
17031740
{
17041741
public OpenApiAnonymousAuthDetails() { }

sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsModelFactory.cs

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)