Skip to content
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

Update to use MGC #305

Open
wants to merge 59 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
83aab5b
Updates to work with new generator
JoshLove-msft Sep 23, 2024
4a27cdc
update
JoshLove-msft Oct 1, 2024
c4e3ef0
regen
JoshLove-msft Oct 2, 2024
7f6be80
Merge branch 'main' of https://github.com/joseharriaga/openai-in-type…
JoshLove-msft Oct 2, 2024
17da7d6
regen
JoshLove-msft Oct 2, 2024
bb6017d
More customization updates
JoshLove-msft Oct 8, 2024
742a3be
More customization
JoshLove-msft Oct 8, 2024
a5c38e8
Regen
JoshLove-msft Oct 15, 2024
14dca30
Down to 66 errors!
JoshLove-msft Oct 17, 2024
e15d456
respect usage
JoshLove-msft Oct 17, 2024
9d2397d
Down to 38
JoshLove-msft Oct 18, 2024
bb41299
12 errors
JoshLove-msft Oct 18, 2024
bbd48fe
Delete tspCodeModel/Configuration.json
JoshLove-msft Oct 18, 2024
2f77980
More updates
JoshLove-msft Oct 22, 2024
f3355fc
more tsp updates for readonly lists
JoshLove-msft Oct 22, 2024
b54da89
more readonly lists
JoshLove-msft Oct 22, 2024
f39f5da
customization fixes
JoshLove-msft Oct 23, 2024
638f6ee
delete json artifacts
JoshLove-msft Oct 23, 2024
267bace
regen
JoshLove-msft Oct 25, 2024
ddfdc1d
Add plugin
JoshLove-msft Oct 25, 2024
a31aba4
delete artifacts again
JoshLove-msft Oct 25, 2024
fa5d171
regen
JoshLove-msft Oct 25, 2024
d04c87e
PR fb
JoshLove-msft Oct 25, 2024
703b19e
Add emitter
JoshLove-msft Oct 29, 2024
7f1aa27
Use floating version
JoshLove-msft Oct 29, 2024
d43a61b
Builds successfully
JoshLove-msft Oct 31, 2024
685c94c
Merge branch 'main' of https://github.com/joseharriaga/openai-in-type…
JoshLove-msft Oct 31, 2024
12aa3e8
missed
JoshLove-msft Oct 31, 2024
16b5701
regen
JoshLove-msft Oct 31, 2024
665ae29
version
JoshLove-msft Oct 31, 2024
a6568ea
Remove extra custom client constructors
JoshLove-msft Oct 31, 2024
4e46d4b
customization fixes
JoshLove-msft Oct 31, 2024
36ad6db
fix Edit-Serialization.ps1
jorgerangel-msft Oct 31, 2024
aebf17c
Bump MGC.CM version and regen
JoshLove-msft Nov 1, 2024
81c6700
regen
JoshLove-msft Nov 2, 2024
60d794a
customization fixes for Chat tests
jorgerangel-msft Nov 4, 2024
ec9a969
Update Invoke-CodeGen to build the plugin
JoshLove-msft Nov 4, 2024
007bda0
package-lock
JoshLove-msft Nov 4, 2024
98c5aa3
Merge branch 'main' of https://github.com/joseharriaga/openai-in-type…
JoshLove-msft Nov 5, 2024
cb73270
regen
JoshLove-msft Nov 5, 2024
649e6db
bump scm version, add customization fixes, & regen
jorgerangel-msft Nov 6, 2024
4542b86
Merge branch 'main' of https://github.com/joseharriaga/openai-in-type…
JoshLove-msft Nov 6, 2024
8a40e6f
regen
JoshLove-msft Nov 6, 2024
eadf547
Relax test assertion to not rely on JSON ordering
JoshLove-msft Nov 6, 2024
4fc9ef4
gen api and fix Assistant collection properties
JoshLove-msft Nov 6, 2024
77674ad
regen
JoshLove-msft Nov 6, 2024
70ba768
regen
JoshLove-msft Nov 7, 2024
c488103
more readonly updates
JoshLove-msft Nov 7, 2024
421b028
Update version and regen
JoshLove-msft Nov 7, 2024
0b2710b
Add back missing factory method
JoshLove-msft Nov 7, 2024
d067922
more get->list suppressions
JoshLove-msft Nov 7, 2024
5375b4a
regen
JoshLove-msft Nov 8, 2024
bdcb242
export api
JoshLove-msft Nov 8, 2024
e98fee8
Remove unnecessary suppression and pass wire options
JoshLove-msft Nov 8, 2024
1faf8fd
another wireoptions
JoshLove-msft Nov 8, 2024
b1c8605
regen with latest generator
JoshLove-msft Nov 13, 2024
1b3ff72
regen against latest
JoshLove-msft Nov 14, 2024
9aea3fa
Merge branch 'main' of https://github.com/joseharriaga/openai-in-type…
jorgerangel-msft Nov 21, 2024
305eb33
update scm to 1.0.0-alpha.20241120.1 & regen
jorgerangel-msft Nov 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .dotnet/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,7 @@ artifacts

# Temporary typespec folders for typespec generation
TempTypeSpecFiles/

# Artifacts from the generator
tspCodeModel.json
Configuration.json
815 changes: 811 additions & 4 deletions .dotnet/api/OpenAI.netstandard2.0.cs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .dotnet/nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="azure-sdk-for-net" value="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" />
</packageSources>
</configuration>
22 changes: 12 additions & 10 deletions .dotnet/src/Custom/Assistants/AssistantClient.Protocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

namespace OpenAI.Assistants;

[CodeGenSuppress("ListAssistantsAsync", typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))]
[CodeGenSuppress("ListAssistants", typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))]
public partial class AssistantClient
{
/// <summary>
Expand All @@ -22,7 +24,7 @@ public virtual async Task<ClientResult> CreateAssistantAsync(BinaryContent conte
Argument.AssertNotNull(content, nameof(content));

using PipelineMessage message = CreateCreateAssistantRequest(content, options);
return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
}

/// <summary>
Expand All @@ -39,7 +41,7 @@ public virtual ClientResult CreateAssistant(BinaryContent content, RequestOption
Argument.AssertNotNull(content, nameof(content));

using PipelineMessage message = CreateCreateAssistantRequest(content, options);
return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options));
return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options));
}

/// <summary>
Expand Down Expand Up @@ -69,7 +71,7 @@ public virtual ClientResult CreateAssistant(BinaryContent content, RequestOption
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual AsyncCollectionResult GetAssistantsAsync(int? limit, string order, string after, string before, RequestOptions options)
{
return new AsyncAssistantCollectionResult(this, _pipeline, options, limit, order, after, before);
return new AsyncAssistantCollectionResult(this, Pipeline, options, limit, order, after, before);
}

/// <summary>
Expand Down Expand Up @@ -99,7 +101,7 @@ public virtual AsyncCollectionResult GetAssistantsAsync(int? limit, string order
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual CollectionResult GetAssistants(int? limit, string order, string after, string before, RequestOptions options)
{
return new AssistantCollectionResult(this, _pipeline, options, limit, order, after, before);
return new AssistantCollectionResult(this, Pipeline, options, limit, order, after, before);
}

/// <summary>
Expand All @@ -117,7 +119,7 @@ public virtual async Task<ClientResult> GetAssistantAsync(string assistantId, Re
Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));

using PipelineMessage message = CreateGetAssistantRequest(assistantId, options);
return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
}

/// <summary>
Expand All @@ -135,7 +137,7 @@ public virtual ClientResult GetAssistant(string assistantId, RequestOptions opti
Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));

using PipelineMessage message = CreateGetAssistantRequest(assistantId, options);
return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options));
return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options));
}

/// <summary>
Expand All @@ -155,7 +157,7 @@ public virtual async Task<ClientResult> ModifyAssistantAsync(string assistantId,
Argument.AssertNotNull(content, nameof(content));

using PipelineMessage message = CreateModifyAssistantRequest(assistantId, content, options);
return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
}

/// <summary>
Expand All @@ -175,7 +177,7 @@ public virtual ClientResult ModifyAssistant(string assistantId, BinaryContent co
Argument.AssertNotNull(content, nameof(content));

using PipelineMessage message = CreateModifyAssistantRequest(assistantId, content, options);
return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options));
return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options));
}

/// <summary>
Expand All @@ -193,7 +195,7 @@ public virtual async Task<ClientResult> DeleteAssistantAsync(string assistantId,
Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));

using PipelineMessage message = CreateDeleteAssistantRequest(assistantId, options);
return ClientResult.FromResponse(await _pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
}

/// <summary>
Expand All @@ -211,7 +213,7 @@ public virtual ClientResult DeleteAssistant(string assistantId, RequestOptions o
Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));

using PipelineMessage message = CreateDeleteAssistantRequest(assistantId, options);
return ClientResult.FromResponse(_pipeline.ProcessMessage(message, options));
return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options));
}

/// <inheritdoc cref="InternalAssistantMessageClient.CreateMessageAsync"/>
Expand Down
Loading