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
2 changes: 1 addition & 1 deletion src/cli/DeepInfra.CLI/Commands/ApiCommand.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static Command Create()
command.Subcommands.Add(AuthenticationApiGroupCommand.Create());
command.Subcommands.Add(BillingApiGroupCommand.Create());
command.Subcommands.Add(ChatCompletionsApiGroupCommand.Create());
command.Subcommands.Add(DecisionsApiGroupCommand.Create());
command.Subcommands.Add(DedicatedModelsApiGroupCommand.Create());
command.Subcommands.Add(EmbeddingsApiGroupCommand.Create());
command.Subcommands.Add(FilesBatchesApiGroupCommand.Create());
Expand All @@ -29,7 +30,6 @@ public static Command Create()
command.Subcommands.Add(ModelsApiGroupCommand.Create());
command.Subcommands.Add(ResponsesApiGroupCommand.Create());
command.Subcommands.Add(SandboxesApiGroupCommand.Create());
command.Subcommands.Add(SystemOneApiGroupCommand.Create());
command.Subcommands.Add(TextCompletionsApiGroupCommand.Create());
command.Subcommands.Add(TextToSpeechApiGroupCommand.Create());
command.Subcommands.Add(TokenizerApiGroupCommand.Create());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

namespace DeepInfra.CLI.Commands;

internal static partial class SystemOneApiGroupCommand
internal static partial class DecisionsApiGroupCommand
{
static partial void CustomizeCommand(ref Command command);

public static Command Create()
{
var command = new Command(@"system-one", @"System One endpoint commands.");
command.Subcommands.Add(SystemOneListModelsCommandApiCommand.Create());
command.Subcommands.Add(SystemOneSystemoneCommandApiCommand.Create());
var command = new Command(@"decisions", @"Decisions endpoint commands.");
command.Subcommands.Add(DecisionsListModelsCommandApiCommand.Create());
command.Subcommands.Add(DecisionsSystemoneCommandApiCommand.Create());
CustomizeCommand(ref command);
return command;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace DeepInfra.CLI.Commands;

internal static partial class SystemOneListModelsCommandApiCommand
internal static partial class DecisionsListModelsCommandApiCommand
{
private static Option<string?> XiApiKey { get; } = new(
name: @"--xi-api-key")
Expand Down Expand Up @@ -56,7 +56,7 @@ await CliRuntime.RunAsync(async () =>
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


var response = await client.SystemOne.ListModelsAsync(
var response = await client.Decisions.ListModelsAsync(
xiApiKey: xiApiKey,
xApiKey: xApiKey,
cancellationToken: cancellationToken).ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace DeepInfra.CLI.Commands;

internal static partial class SystemOneSystemoneCommandApiCommand
internal static partial class DecisionsSystemoneCommandApiCommand
{
private static Option<string?> XiApiKey { get; } = new(
name: @"--xi-api-key")
Expand Down Expand Up @@ -83,7 +83,7 @@ await CliRuntime.RunAsync(async () =>
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


var response = await client.SystemOne.SystemoneAsync(
var response = await client.Decisions.SystemoneAsync(
xiApiKey: xiApiKey,
xApiKey: xApiKey,
state: state,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ namespace DeepInfra
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::DeepInfra.AnyOf<string, object, global::System.Collections.Generic.List<object>, object>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::DeepInfra.DeepinfraDeepapiSystemoneWireModelMetadata>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::DeepInfra.AnyOf<string, object, global::System.Collections.Generic.List<object>>>))]
internal sealed partial class SystemOneSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext
internal sealed partial class DecisionsSourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext
{
}
/// <summary>
///
/// </summary>
public sealed partial class SystemOneSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext
public sealed partial class DecisionsSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext
{
private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver();

Expand All @@ -77,9 +77,9 @@ public sealed partial class SystemOneSourceGenerationContext : global::System.Te
/// <summary>
///
/// </summary>
public static SystemOneSourceGenerationContext Default { get; } = new(DefaultOptions);
public static DecisionsSourceGenerationContext Default { get; } = new(DefaultOptions);

private SystemOneSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options)
private DecisionsSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options)
: base(options)
{
}
Expand Down Expand Up @@ -202,7 +202,7 @@ private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.
{
return index switch
{
0 => new SystemOneSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()),
0 => new DecisionsSourceGenerationContextChunk0(new global::System.Text.Json.JsonSerializerOptions()),
_ => throw new global::System.ArgumentOutOfRangeException(nameof(index)),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace DeepInfra
{
public sealed partial class SystemOneClient
public sealed partial class DecisionsClient
{

/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

namespace DeepInfra
{
public sealed partial class SystemOneClient
public sealed partial class DecisionsClient
{
/// <inheritdoc cref="SystemOneClient(global::System.Net.Http.HttpClient?, global::System.Uri?, global::System.Collections.Generic.List{global::DeepInfra.EndPointAuthorization}?, bool)"/>
/// <inheritdoc cref="DecisionsClient(global::System.Net.Http.HttpClient?, global::System.Uri?, global::System.Collections.Generic.List{global::DeepInfra.EndPointAuthorization}?, bool)"/>

public SystemOneClient(
public DecisionsClient(
string apiKey,
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace DeepInfra
{
public partial class SystemOneClient
public partial class DecisionsClient
{


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace DeepInfra
{
public partial class SystemOneClient
public partial class DecisionsClient
{


Expand Down Expand Up @@ -124,7 +124,7 @@ partial void ProcessSystemoneResponseContent(
{

var __pathBuilder = new global::DeepInfra.PathBuilder(
path: "/typesafe/v1/systemone",
path: "/v1/decisions",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::DeepInfra.AutoSDKRequestOptionsSupport.AppendQueryParameters(
Expand Down Expand Up @@ -203,7 +203,7 @@ partial void ProcessSystemoneResponseContent(
context: global::DeepInfra.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "Systemone",
methodName: "SystemoneAsync",
pathTemplate: "\"/typesafe/v1/systemone\"",
pathTemplate: "\"/v1/decisions\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
Expand Down Expand Up @@ -237,7 +237,7 @@ partial void ProcessSystemoneResponseContent(
context: global::DeepInfra.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "Systemone",
methodName: "SystemoneAsync",
pathTemplate: "\"/typesafe/v1/systemone\"",
pathTemplate: "\"/v1/decisions\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
Expand Down Expand Up @@ -278,7 +278,7 @@ partial void ProcessSystemoneResponseContent(
context: global::DeepInfra.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "Systemone",
methodName: "SystemoneAsync",
pathTemplate: "\"/typesafe/v1/systemone\"",
pathTemplate: "\"/v1/decisions\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
Expand Down Expand Up @@ -326,7 +326,7 @@ partial void ProcessSystemoneResponseContent(
context: global::DeepInfra.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "Systemone",
methodName: "SystemoneAsync",
pathTemplate: "\"/typesafe/v1/systemone\"",
pathTemplate: "\"/v1/decisions\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
Expand All @@ -348,7 +348,7 @@ partial void ProcessSystemoneResponseContent(
context: global::DeepInfra.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "Systemone",
methodName: "SystemoneAsync",
pathTemplate: "\"/typesafe/v1/systemone\"",
pathTemplate: "\"/v1/decisions\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest ?? throw new global::System.InvalidOperationException("The HTTP request was not created before invoking a request hook."),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace DeepInfra
/// If no httpClient is provided, a new one will be created.<br/>
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
public sealed partial class SystemOneClient : global::DeepInfra.ISystemOneClient, global::System.IDisposable
public sealed partial class DecisionsClient : global::DeepInfra.IDecisionsClient, global::System.IDisposable
{
/// <summary>
///
Expand All @@ -34,7 +34,7 @@ public sealed partial class SystemOneClient : global::DeepInfra.ISystemOneClient
/// <inheritdoc/>
public global::DeepInfra.AutoSDKClientOptions Options { get; }

internal global::System.Lazy<global::System.Text.Json.Serialization.JsonSerializerContext> JsonSerializerContextProvider { get; set; } = new(() => global::DeepInfra.SystemOneSourceGenerationContext.Default);
internal global::System.Lazy<global::System.Text.Json.Serialization.JsonSerializerContext> JsonSerializerContextProvider { get; set; } = new(() => global::DeepInfra.DecisionsSourceGenerationContext.Default);

/// <summary>
///
Expand All @@ -47,15 +47,15 @@ public sealed partial class SystemOneClient : global::DeepInfra.ISystemOneClient


/// <summary>
/// Creates a new instance of the SystemOneClient.
/// Creates a new instance of the DecisionsClient.
/// If no httpClient is provided, a new one will be created.
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
/// <param name="httpClient">The HttpClient instance. If not provided, a new one will be created.</param>
/// <param name="baseUri">The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.</param>
/// <param name="authorizations">The authorizations to use for the requests.</param>
/// <param name="disposeHttpClient">Dispose the HttpClient when the instance is disposed. True by default.</param>
public SystemOneClient(
public DecisionsClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List<global::DeepInfra.EndPointAuthorization>? authorizations = null,
Expand All @@ -69,14 +69,14 @@ public SystemOneClient(
}

/// <summary>
/// Creates a new instance of the SystemOneClient with explicit options but no base URL override.
/// Creates a new instance of the DecisionsClient with explicit options but no base URL override.
/// Skips passing <c>baseUri</c> so the default base URL from the OpenAPI spec applies.
/// </summary>
/// <param name="httpClient">The HttpClient instance. If not provided, a new one will be created.</param>
/// <param name="authorizations">The authorizations to use for the requests.</param>
/// <param name="options">Client-wide request defaults such as headers, query parameters, retries, and timeout.</param>
/// <param name="disposeHttpClient">Dispose the HttpClient when the instance is disposed. True by default.</param>
public SystemOneClient(
public DecisionsClient(
global::System.Net.Http.HttpClient? httpClient,
global::System.Collections.Generic.List<global::DeepInfra.EndPointAuthorization>? authorizations,
global::DeepInfra.AutoSDKClientOptions? options,
Expand All @@ -90,7 +90,7 @@ public SystemOneClient(
}

/// <summary>
/// Creates a new instance of the SystemOneClient.
/// Creates a new instance of the DecisionsClient.
/// If no httpClient is provided, a new one will be created.
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
Expand All @@ -99,7 +99,7 @@ public SystemOneClient(
/// <param name="authorizations">The authorizations to use for the requests.</param>
/// <param name="options">Client-wide request defaults such as headers, query parameters, retries, and timeout.</param>
/// <param name="disposeHttpClient">Dispose the HttpClient when the instance is disposed. True by default.</param>
public SystemOneClient(
public DecisionsClient(
global::System.Net.Http.HttpClient? httpClient,
global::System.Uri? baseUri,
global::System.Collections.Generic.List<global::DeepInfra.EndPointAuthorization>? authorizations,
Expand Down
18 changes: 9 additions & 9 deletions src/libs/DeepInfra/Generated/DeepInfra.DeepInfraClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ public sealed partial class DeepInfraClient : global::DeepInfra.IDeepInfraClient
JsonSerializerContextProvider = JsonSerializerContextProvider,
};

/// <summary>
///
/// </summary>
public DecisionsClient Decisions => new DecisionsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContextProvider = JsonSerializerContextProvider,
};

/// <summary>
/// Deploy and manage private model instances with autoscaling.
/// </summary>
Expand Down Expand Up @@ -200,15 +209,6 @@ public sealed partial class DeepInfraClient : global::DeepInfra.IDeepInfraClient
JsonSerializerContextProvider = JsonSerializerContextProvider,
};

/// <summary>
///
/// </summary>
public SystemOneClient SystemOne => new SystemOneClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContextProvider = JsonSerializerContextProvider,
};

/// <summary>
/// OpenAI-compatible text completion endpoints.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace DeepInfra
{
public partial interface ISystemOneClient
public partial interface IDecisionsClient
{
/// <summary>
/// Authorize using bearer authentication.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace DeepInfra
{
public partial interface ISystemOneClient
public partial interface IDecisionsClient
{
/// <summary>
/// List Models
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace DeepInfra
{
public partial interface ISystemOneClient
public partial interface IDecisionsClient
{
/// <summary>
/// Systemone
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace DeepInfra
/// If no httpClient is provided, a new one will be created.<br/>
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
public partial interface ISystemOneClient : global::System.IDisposable
public partial interface IDecisionsClient : global::System.IDisposable
{
/// <summary>
/// The HttpClient instance.
Expand Down
10 changes: 5 additions & 5 deletions src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ public partial interface IDeepInfraClient : global::System.IDisposable
/// </summary>
public ChatCompletionsClient ChatCompletions { get; }

/// <summary>
///
/// </summary>
public DecisionsClient Decisions { get; }

/// <summary>
/// Deploy and manage private model instances with autoscaling.
/// </summary>
Expand Down Expand Up @@ -130,11 +135,6 @@ public partial interface IDeepInfraClient : global::System.IDisposable
/// </summary>
public SandboxesClient Sandboxes { get; }

/// <summary>
///
/// </summary>
public SystemOneClient SystemOne { get; }

/// <summary>
/// OpenAI-compatible text completion endpoints.
/// </summary>
Expand Down
Loading
Loading