Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 26, 2024
1 parent 4e5bdd8 commit 7b82797
Show file tree
Hide file tree
Showing 44 changed files with 1,782 additions and 1,782 deletions.
20 changes: 10 additions & 10 deletions src/libs/OpenAI/Generated/JsonConverters.AnnotationsItem.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ public class AnnotationsItemJsonConverter : global::System.Text.Json.Serializati
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminator)}");
var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);

global::OpenAI.MessageContentTextAnnotationsFileCitationObject? messageContentTextFileCitationObject = default;
global::OpenAI.MessageContentTextAnnotationsFileCitationObject? fileCitation = default;
if (discriminator?.Type == global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType.FileCitation)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::OpenAI.MessageContentTextAnnotationsFileCitationObject> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentTextAnnotationsFileCitationObject)}");
messageContentTextFileCitationObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::OpenAI.MessageContentTextAnnotationsFilePathObject? messageContentTextFilePathObject = default;
global::OpenAI.MessageContentTextAnnotationsFilePathObject? filePath = default;
if (discriminator?.Type == global::OpenAI.MessageContentTextObjectTextAnnotationDiscriminatorType.FilePath)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::OpenAI.MessageContentTextAnnotationsFilePathObject> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageContentTextAnnotationsFilePathObject)}");
messageContentTextFilePathObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
filePath = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}

var result = new global::OpenAI.AnnotationsItem(
discriminator?.Type,
messageContentTextFileCitationObject,
messageContentTextFilePathObject
fileCitation,
filePath
);

return result;
Expand All @@ -54,17 +54,17 @@ public override void Write(
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");

if (value.IsMessageContentTextFileCitationObject)
if (value.IsFileCitation)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::OpenAI.MessageContentTextAnnotationsFileCitationObject?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageContentTextAnnotationsFileCitationObject).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageContentTextFileCitationObject, typeInfo);
global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitation, typeInfo);
}
else if (value.IsMessageContentTextFilePathObject)
else if (value.IsFilePath)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::OpenAI.MessageContentTextAnnotationsFilePathObject?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageContentTextAnnotationsFilePathObject).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageContentTextFilePathObject, typeInfo);
global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilePath, typeInfo);
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions src/libs/OpenAI/Generated/JsonConverters.AnnotationsItem2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ public class AnnotationsItem2JsonConverter : global::System.Text.Json.Serializat
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminator)}");
var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);

global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? messageDeltaContentTextFileCitationObject = default;
global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject? fileCitation = default;
if (discriminator?.Type == global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.FileCitation)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject)}");
messageDeltaContentTextFileCitationObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? messageDeltaContentTextFilePathObject = default;
global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject? filePath = default;
if (discriminator?.Type == global::OpenAI.MessageDeltaContentTextObjectTextAnnotationDiscriminatorType.FilePath)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject)}");
messageDeltaContentTextFilePathObject = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
filePath = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}

var result = new global::OpenAI.AnnotationsItem2(
discriminator?.Type,
messageDeltaContentTextFileCitationObject,
messageDeltaContentTextFilePathObject
fileCitation,
filePath
);

return result;
Expand All @@ -54,17 +54,17 @@ public override void Write(
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");

if (value.IsMessageDeltaContentTextFileCitationObject)
if (value.IsFileCitation)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFileCitationObject).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaContentTextFileCitationObject, typeInfo);
global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitation, typeInfo);
}
else if (value.IsMessageDeltaContentTextFilePathObject)
else if (value.IsFilePath)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.MessageDeltaContentTextAnnotationsFilePathObject).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDeltaContentTextFilePathObject, typeInfo);
global::System.Text.Json.JsonSerializer.Serialize(writer, value.FilePath, typeInfo);
}
}
}
Expand Down
Loading

0 comments on commit 7b82797

Please sign in to comment.