Skip to content

Commit a836669

Browse files
HavenDVgithub-actions[bot]
andauthored
feat: Updated OpenAPI spec (#170)
Co-authored-by: github-actions[bot] <[email protected]>
1 parent 405d006 commit a836669

File tree

633 files changed

+56290
-22638
lines changed

Some content is hidden

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

633 files changed

+56290
-22638
lines changed

src/libs/tryAGI.OpenAI/Generated/AllOf.2.g.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace tryAGI.OpenAI
2828
/// <summary>
2929
///
3030
/// </summary>
31-
public static implicit operator AllOf<T1, T2>(T1 value) => new AllOf<T1, T2>(value);
31+
public static implicit operator AllOf<T1, T2>(T1 value) => new AllOf<T1, T2>((T1?)value);
3232

3333
/// <summary>
3434
///
@@ -63,7 +63,7 @@ public AllOf(T1? value)
6363
/// <summary>
6464
///
6565
/// </summary>
66-
public static implicit operator AllOf<T1, T2>(T2 value) => new AllOf<T1, T2>(value);
66+
public static implicit operator AllOf<T1, T2>(T2 value) => new AllOf<T1, T2>((T2?)value);
6767

6868
/// <summary>
6969
///

src/libs/tryAGI.OpenAI/Generated/AnyOf.2.g.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace tryAGI.OpenAI
2828
/// <summary>
2929
///
3030
/// </summary>
31-
public static implicit operator AnyOf<T1, T2>(T1 value) => new AnyOf<T1, T2>(value);
31+
public static implicit operator AnyOf<T1, T2>(T1 value) => new AnyOf<T1, T2>((T1?)value);
3232

3333
/// <summary>
3434
///
@@ -63,7 +63,7 @@ public AnyOf(T1? value)
6363
/// <summary>
6464
///
6565
/// </summary>
66-
public static implicit operator AnyOf<T1, T2>(T2 value) => new AnyOf<T1, T2>(value);
66+
public static implicit operator AnyOf<T1, T2>(T2 value) => new AnyOf<T1, T2>((T2?)value);
6767

6868
/// <summary>
6969
///

src/libs/tryAGI.OpenAI/Generated/JsonConverters.Annotation.g.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
1717

1818
var
1919
readerCopy = reader;
20-
global::tryAGI.OpenAI.FileCitation? fileCitation = default;
20+
global::tryAGI.OpenAI.FileCitationBody? fileCitationBody = default;
2121
try
2222
{
23-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.FileCitation> ??
24-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitation).Name}");
25-
fileCitation = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo);
23+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.FileCitationBody> ??
24+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitationBody).Name}");
25+
fileCitationBody = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo);
2626
}
2727
catch (global::System.Text.Json.JsonException)
2828
{
2929
}
3030

3131
readerCopy = reader;
32-
global::tryAGI.OpenAI.UrlCitation? urlCitation = default;
32+
global::tryAGI.OpenAI.UrlCitationBody? urlCitationBody = default;
3333
try
3434
{
35-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.UrlCitation> ??
36-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitation).Name}");
37-
urlCitation = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo);
35+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.UrlCitationBody> ??
36+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitationBody).Name}");
37+
urlCitationBody = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo);
3838
}
3939
catch (global::System.Text.Json.JsonException)
4040
{
@@ -53,21 +53,21 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
5353
}
5454

5555
var result = new global::tryAGI.OpenAI.Annotation(
56-
fileCitation,
57-
urlCitation,
56+
fileCitationBody,
57+
urlCitationBody,
5858
filePath
5959
);
6060

61-
if (fileCitation != null)
61+
if (fileCitationBody != null)
6262
{
63-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.FileCitation> ??
64-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitation).Name}");
63+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.FileCitationBody> ??
64+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitationBody).Name}");
6565
_ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
6666
}
67-
else if (urlCitation != null)
67+
else if (urlCitationBody != null)
6868
{
69-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.UrlCitation> ??
70-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitation).Name}");
69+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.UrlCitationBody> ??
70+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitationBody).Name}");
7171
_ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
7272
}
7373
else if (filePath != null)
@@ -89,17 +89,17 @@ public override void Write(
8989
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
9090
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
9191

92-
if (value.IsFileCitation)
92+
if (value.IsFileCitationBody)
9393
{
94-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.FileCitation?> ??
95-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitation).Name}");
96-
global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitation, typeInfo);
94+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.FileCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.FileCitationBody?> ??
95+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.FileCitationBody).Name}");
96+
global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileCitationBody, typeInfo);
9797
}
98-
else if (value.IsUrlCitation)
98+
else if (value.IsUrlCitationBody)
9999
{
100-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitation), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.UrlCitation?> ??
101-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitation).Name}");
102-
global::System.Text.Json.JsonSerializer.Serialize(writer, value.UrlCitation, typeInfo);
100+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::tryAGI.OpenAI.UrlCitationBody), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::tryAGI.OpenAI.UrlCitationBody?> ??
101+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::tryAGI.OpenAI.UrlCitationBody).Name}");
102+
global::System.Text.Json.JsonSerializer.Serialize(writer, value.UrlCitationBody, typeInfo);
103103
}
104104
else if (value.IsFilePath)
105105
{

src/libs/tryAGI.OpenAI/Generated/JsonConverters.CodeInterpreterToolType.g.cs renamed to src/libs/tryAGI.OpenAI/Generated/JsonConverters.ApproximateLocationType.g.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace tryAGI.OpenAI.JsonConverters
44
{
55
/// <inheritdoc />
6-
public sealed class CodeInterpreterToolTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.CodeInterpreterToolType>
6+
public sealed class ApproximateLocationTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.ApproximateLocationType>
77
{
88
/// <inheritdoc />
9-
public override global::tryAGI.OpenAI.CodeInterpreterToolType Read(
9+
public override global::tryAGI.OpenAI.ApproximateLocationType Read(
1010
ref global::System.Text.Json.Utf8JsonReader reader,
1111
global::System.Type typeToConvert,
1212
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,15 +18,15 @@ public sealed class CodeInterpreterToolTypeJsonConverter : global::System.Text.J
1818
var stringValue = reader.GetString();
1919
if (stringValue != null)
2020
{
21-
return global::tryAGI.OpenAI.CodeInterpreterToolTypeExtensions.ToEnum(stringValue) ?? default;
21+
return global::tryAGI.OpenAI.ApproximateLocationTypeExtensions.ToEnum(stringValue) ?? default;
2222
}
2323

2424
break;
2525
}
2626
case global::System.Text.Json.JsonTokenType.Number:
2727
{
2828
var numValue = reader.GetInt32();
29-
return (global::tryAGI.OpenAI.CodeInterpreterToolType)numValue;
29+
return (global::tryAGI.OpenAI.ApproximateLocationType)numValue;
3030
}
3131
default:
3232
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -38,12 +38,12 @@ public sealed class CodeInterpreterToolTypeJsonConverter : global::System.Text.J
3838
/// <inheritdoc />
3939
public override void Write(
4040
global::System.Text.Json.Utf8JsonWriter writer,
41-
global::tryAGI.OpenAI.CodeInterpreterToolType value,
41+
global::tryAGI.OpenAI.ApproximateLocationType value,
4242
global::System.Text.Json.JsonSerializerOptions options)
4343
{
4444
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
4545

46-
writer.WriteStringValue(global::tryAGI.OpenAI.CodeInterpreterToolTypeExtensions.ToValueString(value));
46+
writer.WriteStringValue(global::tryAGI.OpenAI.ApproximateLocationTypeExtensions.ToValueString(value));
4747
}
4848
}
4949
}

src/libs/tryAGI.OpenAI/Generated/JsonConverters.CodeInterpreterToolTypeNullable.g.cs renamed to src/libs/tryAGI.OpenAI/Generated/JsonConverters.ApproximateLocationTypeNullable.g.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace tryAGI.OpenAI.JsonConverters
44
{
55
/// <inheritdoc />
6-
public sealed class CodeInterpreterToolTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.CodeInterpreterToolType?>
6+
public sealed class ApproximateLocationTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.ApproximateLocationType?>
77
{
88
/// <inheritdoc />
9-
public override global::tryAGI.OpenAI.CodeInterpreterToolType? Read(
9+
public override global::tryAGI.OpenAI.ApproximateLocationType? Read(
1010
ref global::System.Text.Json.Utf8JsonReader reader,
1111
global::System.Type typeToConvert,
1212
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,15 +18,15 @@ public sealed class CodeInterpreterToolTypeNullableJsonConverter : global::Syste
1818
var stringValue = reader.GetString();
1919
if (stringValue != null)
2020
{
21-
return global::tryAGI.OpenAI.CodeInterpreterToolTypeExtensions.ToEnum(stringValue);
21+
return global::tryAGI.OpenAI.ApproximateLocationTypeExtensions.ToEnum(stringValue);
2222
}
2323

2424
break;
2525
}
2626
case global::System.Text.Json.JsonTokenType.Number:
2727
{
2828
var numValue = reader.GetInt32();
29-
return (global::tryAGI.OpenAI.CodeInterpreterToolType)numValue;
29+
return (global::tryAGI.OpenAI.ApproximateLocationType)numValue;
3030
}
3131
default:
3232
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -38,7 +38,7 @@ public sealed class CodeInterpreterToolTypeNullableJsonConverter : global::Syste
3838
/// <inheritdoc />
3939
public override void Write(
4040
global::System.Text.Json.Utf8JsonWriter writer,
41-
global::tryAGI.OpenAI.CodeInterpreterToolType? value,
41+
global::tryAGI.OpenAI.ApproximateLocationType? value,
4242
global::System.Text.Json.JsonSerializerOptions options)
4343
{
4444
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
@@ -49,7 +49,7 @@ public override void Write(
4949
}
5050
else
5151
{
52-
writer.WriteStringValue(global::tryAGI.OpenAI.CodeInterpreterToolTypeExtensions.ToValueString(value.Value));
52+
writer.WriteStringValue(global::tryAGI.OpenAI.ApproximateLocationTypeExtensions.ToValueString(value.Value));
5353
}
5454
}
5555
}

src/libs/tryAGI.OpenAI/Generated/JsonConverters.WebSearchToolType.g.cs renamed to src/libs/tryAGI.OpenAI/Generated/JsonConverters.CertificateObject.g.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace tryAGI.OpenAI.JsonConverters
44
{
55
/// <inheritdoc />
6-
public sealed class WebSearchToolTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.WebSearchToolType>
6+
public sealed class CertificateObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.CertificateObject>
77
{
88
/// <inheritdoc />
9-
public override global::tryAGI.OpenAI.WebSearchToolType Read(
9+
public override global::tryAGI.OpenAI.CertificateObject Read(
1010
ref global::System.Text.Json.Utf8JsonReader reader,
1111
global::System.Type typeToConvert,
1212
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,15 +18,15 @@ public sealed class WebSearchToolTypeJsonConverter : global::System.Text.Json.Se
1818
var stringValue = reader.GetString();
1919
if (stringValue != null)
2020
{
21-
return global::tryAGI.OpenAI.WebSearchToolTypeExtensions.ToEnum(stringValue) ?? default;
21+
return global::tryAGI.OpenAI.CertificateObjectExtensions.ToEnum(stringValue) ?? default;
2222
}
2323

2424
break;
2525
}
2626
case global::System.Text.Json.JsonTokenType.Number:
2727
{
2828
var numValue = reader.GetInt32();
29-
return (global::tryAGI.OpenAI.WebSearchToolType)numValue;
29+
return (global::tryAGI.OpenAI.CertificateObject)numValue;
3030
}
3131
default:
3232
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -38,12 +38,12 @@ public sealed class WebSearchToolTypeJsonConverter : global::System.Text.Json.Se
3838
/// <inheritdoc />
3939
public override void Write(
4040
global::System.Text.Json.Utf8JsonWriter writer,
41-
global::tryAGI.OpenAI.WebSearchToolType value,
41+
global::tryAGI.OpenAI.CertificateObject value,
4242
global::System.Text.Json.JsonSerializerOptions options)
4343
{
4444
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
4545

46-
writer.WriteStringValue(global::tryAGI.OpenAI.WebSearchToolTypeExtensions.ToValueString(value));
46+
writer.WriteStringValue(global::tryAGI.OpenAI.CertificateObjectExtensions.ToValueString(value));
4747
}
4848
}
4949
}

src/libs/tryAGI.OpenAI/Generated/JsonConverters.WebSearchToolTypeNullable.g.cs renamed to src/libs/tryAGI.OpenAI/Generated/JsonConverters.CertificateObjectNullable.g.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace tryAGI.OpenAI.JsonConverters
44
{
55
/// <inheritdoc />
6-
public sealed class WebSearchToolTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.WebSearchToolType?>
6+
public sealed class CertificateObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::tryAGI.OpenAI.CertificateObject?>
77
{
88
/// <inheritdoc />
9-
public override global::tryAGI.OpenAI.WebSearchToolType? Read(
9+
public override global::tryAGI.OpenAI.CertificateObject? Read(
1010
ref global::System.Text.Json.Utf8JsonReader reader,
1111
global::System.Type typeToConvert,
1212
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,15 +18,15 @@ public sealed class WebSearchToolTypeNullableJsonConverter : global::System.Text
1818
var stringValue = reader.GetString();
1919
if (stringValue != null)
2020
{
21-
return global::tryAGI.OpenAI.WebSearchToolTypeExtensions.ToEnum(stringValue);
21+
return global::tryAGI.OpenAI.CertificateObjectExtensions.ToEnum(stringValue);
2222
}
2323

2424
break;
2525
}
2626
case global::System.Text.Json.JsonTokenType.Number:
2727
{
2828
var numValue = reader.GetInt32();
29-
return (global::tryAGI.OpenAI.WebSearchToolType)numValue;
29+
return (global::tryAGI.OpenAI.CertificateObject)numValue;
3030
}
3131
default:
3232
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -38,7 +38,7 @@ public sealed class WebSearchToolTypeNullableJsonConverter : global::System.Text
3838
/// <inheritdoc />
3939
public override void Write(
4040
global::System.Text.Json.Utf8JsonWriter writer,
41-
global::tryAGI.OpenAI.WebSearchToolType? value,
41+
global::tryAGI.OpenAI.CertificateObject? value,
4242
global::System.Text.Json.JsonSerializerOptions options)
4343
{
4444
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
@@ -49,7 +49,7 @@ public override void Write(
4949
}
5050
else
5151
{
52-
writer.WriteStringValue(global::tryAGI.OpenAI.WebSearchToolTypeExtensions.ToValueString(value.Value));
52+
writer.WriteStringValue(global::tryAGI.OpenAI.CertificateObjectExtensions.ToValueString(value.Value));
5353
}
5454
}
5555
}

0 commit comments

Comments
 (0)