Skip to content
Merged
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
3 changes: 2 additions & 1 deletion codegen/generator/src/OpenAI.Library.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20250924.1" />
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20250926.1" />
</ItemGroup>

<!-- Copy output to package dist path for local execution and -->
Expand All @@ -24,3 +24,4 @@
</Project>



2 changes: 1 addition & 1 deletion codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"@open-ai/plugin": "file:",
"@azure-tools/typespec-client-generator-core": "0.60.0",
"@typespec/http-client-csharp": "1.0.0-alpha.20250924.1",
"@typespec/http-client-csharp": "1.0.0-alpha.20250926.1",
"@typespec/http": "1.4.0",
"@typespec/openapi": "1.4.0"
},
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,7 @@ protected virtual Assistant PersistableModelCreateCore(BinaryData data, ModelRea
public static explicit operator Assistant(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeAssistant(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ protected virtual AssistantDeletionResult PersistableModelCreateCore(BinaryData
public static explicit operator AssistantDeletionResult(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeAssistantDeletionResult(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ protected virtual AssistantThread PersistableModelCreateCore(BinaryData data, Mo
public static explicit operator AssistantThread(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeAssistantThread(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ protected virtual InternalListAssistantsResponse PersistableModelCreateCore(Bina
public static explicit operator InternalListAssistantsResponse(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalListAssistantsResponse(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ protected virtual InternalListMessagesResponse PersistableModelCreateCore(Binary
public static explicit operator InternalListMessagesResponse(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalListMessagesResponse(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ protected virtual InternalListRunStepsResponse PersistableModelCreateCore(Binary
public static explicit operator InternalListRunStepsResponse(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalListRunStepsResponse(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ protected virtual InternalListRunsResponse PersistableModelCreateCore(BinaryData
public static explicit operator InternalListRunsResponse(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalListRunsResponse(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ protected virtual MessageDeletionResult PersistableModelCreateCore(BinaryData da
public static explicit operator MessageDeletionResult(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeMessageDeletionResult(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/Generated/Models/Assistants/RunStep.Serialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ protected virtual RunStep PersistableModelCreateCore(BinaryData data, ModelReade
public static explicit operator RunStep(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeRunStep(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ protected virtual ThreadDeletionResult PersistableModelCreateCore(BinaryData dat
public static explicit operator ThreadDeletionResult(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeThreadDeletionResult(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,7 @@ protected virtual ThreadMessage PersistableModelCreateCore(BinaryData data, Mode
public static explicit operator ThreadMessage(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeThreadMessage(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,7 @@ protected virtual ThreadRun PersistableModelCreateCore(BinaryData data, ModelRea
public static explicit operator ThreadRun(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeThreadRun(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,7 @@ protected virtual InternalBatchJob PersistableModelCreateCore(BinaryData data, M
public static explicit operator InternalBatchJob(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalBatchJob(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ protected virtual InternalListBatchesResponse PersistableModelCreateCore(BinaryD
public static explicit operator InternalListBatchesResponse(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalListBatchesResponse(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/Generated/Models/Chat/ChatCompletion.Serialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ protected virtual ChatCompletion PersistableModelCreateCore(BinaryData data, Mod
public static explicit operator ChatCompletion(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeChatCompletion(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ protected virtual ChatCompletionDeletionResult PersistableModelCreateCore(Binary
public static explicit operator ChatCompletionDeletionResult(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeChatCompletionDeletionResult(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ protected virtual InternalChatCompletionList PersistableModelCreateCore(BinaryDa
public static explicit operator InternalChatCompletionList(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalChatCompletionList(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ protected virtual InternalChatCompletionMessageList PersistableModelCreateCore(B
public static explicit operator InternalChatCompletionMessageList(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalChatCompletionMessageList(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ protected virtual ContainerFileResource PersistableModelCreateCore(BinaryData da
public static explicit operator ContainerFileResource(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeContainerFileResource(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ protected virtual ContainerResource PersistableModelCreateCore(BinaryData data,
public static explicit operator ContainerResource(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeContainerResource(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ protected virtual DeleteContainerFileResponse PersistableModelCreateCore(BinaryD
public static explicit operator DeleteContainerFileResponse(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeDeleteContainerFileResponse(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ protected virtual DeleteContainerResponse PersistableModelCreateCore(BinaryData
public static explicit operator DeleteContainerResponse(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeDeleteContainerResponse(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ protected virtual InternalContainerFileListResource PersistableModelCreateCore(B
public static explicit operator InternalContainerFileListResource(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalContainerFileListResource(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ protected virtual InternalContainerListResource PersistableModelCreateCore(Binar
public static explicit operator InternalContainerListResource(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalContainerListResource(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ protected virtual OpenAIEmbeddingCollection PersistableModelCreateCore(BinaryDat
public static explicit operator OpenAIEmbeddingCollection(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeOpenAIEmbeddingCollection(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ protected virtual InternalDeleteEvalResponse PersistableModelCreateCore(BinaryDa
public static explicit operator InternalDeleteEvalResponse(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalDeleteEvalResponse(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ protected virtual InternalDeleteEvalRunResponse PersistableModelCreateCore(Binar
public static explicit operator InternalDeleteEvalRunResponse(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalDeleteEvalRunResponse(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/Generated/Models/Evals/InternalEval.Serialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ protected virtual InternalEval PersistableModelCreateCore(BinaryData data, Model
public static explicit operator InternalEval(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalEval(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ protected virtual InternalEvalList PersistableModelCreateCore(BinaryData data, M
public static explicit operator InternalEvalList(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalEvalList(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,7 @@ protected virtual InternalEvalRun PersistableModelCreateCore(BinaryData data, Mo
public static explicit operator InternalEvalRun(ClientResult result)
{
using PipelineResponse response = result.GetRawResponse();
BinaryData data = response.Content;
using JsonDocument document = JsonDocument.Parse(data);
using JsonDocument document = JsonDocument.Parse(response.Content);
return DeserializeInternalEvalRun(document.RootElement, ModelSerializationExtensions.WireOptions);
}
}
Expand Down
Loading