Skip to content

Commit

Permalink
feat: Additional cases of object generation instead empty classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Oct 11, 2024
1 parent f57f27f commit 5be79d3
Show file tree
Hide file tree
Showing 887 changed files with 10,946 additions and 13,166 deletions.
14 changes: 7 additions & 7 deletions src/libs/AutoSDK/Models/TypeData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,15 @@ public static string GetCSharpType(SchemaContext context)
!context.Schema.ResolveIfRequired().AdditionalPropertiesAllowed) =>
$"global::{context.Settings.Namespace}.{context.Id}",

("object", _) or (null, "object") when context.Schema.Reference == null =>
$"global::{context.Settings.Namespace}.{context.Id}",

// ("object", _) when
// context.Schema.Reference == null &&
// (context.Schema.Properties.Count > 0 ||
// !context.Schema.AdditionalPropertiesAllowed) =>
// ("object", _) or (null, "object") when context.Schema.Reference == null =>
// $"global::{context.Settings.Namespace}.{context.Id}",

("object", _) or (null, "object") when
context.Schema.Reference == null &&
(context.Schema.Properties.Count > 0 ||
!context.Schema.AdditionalPropertiesAllowed) =>
$"global::{context.Settings.Namespace}.{context.Id}",

("object", _) when
context.Schema.AdditionalProperties?.Type is not null =>
$"global::System.Collections.Generic.Dictionary<string, {context.Children.FirstOrDefault(x => x.Hint == Hint.AdditionalProperties)?.TypeData?.CSharpType}>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ partial void ProcessV1J2GrandeCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ partial void ProcessV1J2GrandeCustomModelCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ partial void ProcessV1J2GrandeInstructCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ partial void ProcessV1J2JumboCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ partial void ProcessV1J2JumboComplete2ResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ partial void ProcessV1J2JumboInstructCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ partial void ProcessV1J2LargeCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ partial void ProcessV1J2LargeCustomModelCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ partial void ProcessV1J2LargeInstructCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ partial void ProcessV1J2LightCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ partial void ProcessV1J2LightCustomModelCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ partial void ProcessV1J2MidCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ partial void ProcessV1J2MidCustomModelCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ partial void ProcessV1J2UltraCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ partial void ProcessV1J2UltraComplete2ResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public partial interface ICompletionClient
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public sealed partial class ChatCompletion
///
/// </summary>
[global::Newtonsoft.Json.JsonProperty("meta")]
public global::G.ChatCompletionMeta? Meta { get; set; }
public object? Meta { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public sealed partial class ChatCompletionVllmStreamingMessage
///
/// </summary>
[global::Newtonsoft.Json.JsonProperty("meta")]
public global::G.ChatCompletionVllmStreamingMessageMeta? Meta { get; set; }
public object? Meta { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public sealed partial class CompletionBody
///
/// </summary>
[global::Newtonsoft.Json.JsonProperty("logitBias")]
public global::G.CompletionBodyLogitBias? LogitBias { get; set; }
public object? LogitBias { get; set; }

/// <summary>
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public sealed partial class DocumentSchema
///
/// </summary>
[global::Newtonsoft.Json.JsonProperty("metadata")]
public global::G.DocumentSchemaMetadata? Metadata { get; set; }
public global::System.Collections.Generic.Dictionary<string, string>? Metadata { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public sealed partial class ToolParameters
///
/// </summary>
[global::Newtonsoft.Json.JsonProperty("properties", Required = global::Newtonsoft.Json.Required.Always)]
public global::G.ToolParametersProperties Properties { get; set; } = default!;
public object Properties { get; set; } = default!;

/// <summary>
/// List of required properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ partial void ProcessV1J2GrandeCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ partial void ProcessV1J2GrandeCustomModelCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ partial void ProcessV1J2GrandeInstructCompleteResponseContent(
double? minP = 0,
global::System.Collections.Generic.IList<string>? stopSequences = default,
int? topKReturn = 0,
global::G.CompletionBodyLogitBias? logitBias = default,
object? logitBias = default,
global::G.Penalty? frequencyPenalty = default,
global::G.Penalty? presencePenalty = default,
global::G.Penalty? countPenalty = default,
Expand Down
Loading

0 comments on commit 5be79d3

Please sign in to comment.