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 .claude/skills/tryagi-openai/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dnx tryAGI.OpenAI.CLI <group> --help
| `user-organization-role-assignment` | 4 | |
| `vector-store` | 16 | |
| `video` | 10 | |
| `default` | 24 | |
| `default` | 30 | |

## References

Expand Down
6 changes: 6 additions & 0 deletions .claude/skills/tryagi-openai/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ Use Uploads to upload large files in multiple parts.
| `delete-acontainer-file` | `DELETE /containers/{container_id}/files/{file_id}` | Delete Container File |
| `delete-admin-api-key` | `DELETE /organization/admin_api_keys/{key_id}` | Delete an organization admin API key |
| `delete-chat-kit-thread` | `DELETE /chatkit/threads/{thread_id}` | Delete a ChatKit thread along with its items and stored attachments. |
| `delete-organization-spend-limit` | `DELETE /organization/spend_limit` | Delete the organization's hard spend limit. |
| `delete-project-spend-limit` | `DELETE /organization/projects/{project_id}/spend_limit` | Delete a project's hard spend limit. |
| `get-input-token-counts` | `POST /responses/input_tokens` | Returns input token counts of the request. Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count. |
| `get-input-token-counts` | `POST /responses/input_tokens?beta=true` | Returns input token counts of the request. Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count. |
| `list-all-organization-and-project-api-keys` | `GET /organization/admin_api_keys` | List organization API keys |
Expand All @@ -492,6 +494,10 @@ Use Uploads to upload large files in multiple parts.
| `retrieve-container` | `GET /containers/{container_id}` | Retrieve Container |
| `retrieve-container-file` | `GET /containers/{container_id}/files/{file_id}` | Retrieve Container File |
| `retrieve-container-file-content` | `GET /containers/{container_id}/files/{file_id}/content` | Retrieve Container File Content |
| `retrieve-organization-spend-limit` | `GET /organization/spend_limit` | Get the organization's hard spend limit. |
| `retrieve-project-spend-limit` | `GET /organization/projects/{project_id}/spend_limit` | Get a project's hard spend limit. |
| `update-organization-spend-limit` | `POST /organization/spend_limit` | Create or replace the organization's hard spend limit. |
| `update-project-spend-limit` | `POST /organization/projects/{project_id}/spend_limit` | Create or replace a project's hard spend limit. |

## Usage tips

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public static Command Create()
command.Subcommands.Add(DeleteAContainerFileCommandApiCommand.Create());
command.Subcommands.Add(DeleteAdminApiKeyCommandApiCommand.Create());
command.Subcommands.Add(DeleteChatKitThreadCommandApiCommand.Create());
command.Subcommands.Add(DeleteOrganizationSpendLimitCommandApiCommand.Create());
command.Subcommands.Add(DeleteProjectSpendLimitCommandApiCommand.Create());
command.Subcommands.Add(GetInputTokenCountsCommandApiCommand.Create());
command.Subcommands.Add(GetInputTokenCounts2CommandApiCommand.Create());
command.Subcommands.Add(ListAllOrganizationAndProjectApiKeysCommandApiCommand.Create());
Expand All @@ -33,6 +35,10 @@ public static Command Create()
command.Subcommands.Add(RetrieveContainerCommandApiCommand.Create());
command.Subcommands.Add(RetrieveContainerFileCommandApiCommand.Create());
command.Subcommands.Add(RetrieveContainerFileContentCommandApiCommand.Create());
command.Subcommands.Add(RetrieveOrganizationSpendLimitCommandApiCommand.Create());
command.Subcommands.Add(RetrieveProjectSpendLimitCommandApiCommand.Create());
command.Subcommands.Add(UpdateOrganizationSpendLimitCommandApiCommand.Create());
command.Subcommands.Add(UpdateProjectSpendLimitCommandApiCommand.Create());
return command;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands;

internal static partial class DeleteOrganizationSpendLimitCommandApiCommand
{


private static string FormatResponse(ParseResult parseResult, global::tryAGI.OpenAI.OrganizationSpendLimitDeletedResource value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
{
string? text = null;
CustomizeResponseText(parseResult, value, ref text);
if (!string.IsNullOrWhiteSpace(text))
{
return text;
}

var hints = new Dictionary<string, CliFormatHint>(StringComparer.OrdinalIgnoreCase)
{
};
CustomizeResponseFormatHints(hints);
return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints);
}

static partial void CustomizeResponseText(ParseResult parseResult, global::tryAGI.OpenAI.OrganizationSpendLimitDeletedResource value, ref string? text);
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


public static Command Create()
{
var command = new Command(@"delete-organization-spend-limit", @"Delete the organization's hard spend limit.");



command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) =>
await CliRuntime.RunAsync(async () =>
{

using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


var response = await client.DeleteOrganizationSpendLimitAsync(

cancellationToken: cancellationToken).ConfigureAwait(false);


await CliRuntime.WriteResponseAsync(
parseResult,
response,
global::tryAGI.OpenAI.SourceGenerationContext.Default,
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
return command;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands;

internal static partial class DeleteProjectSpendLimitCommandApiCommand
{
private static Argument<string> ProjectId { get; } = new(
name: @"project-id")
{
Description = @"The ID of the project whose hard spend limit is being managed.",
};

private static string FormatResponse(ParseResult parseResult, global::tryAGI.OpenAI.ProjectSpendLimitDeletedResource value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
{
string? text = null;
CustomizeResponseText(parseResult, value, ref text);
if (!string.IsNullOrWhiteSpace(text))
{
return text;
}

var hints = new Dictionary<string, CliFormatHint>(StringComparer.OrdinalIgnoreCase)
{
};
CustomizeResponseFormatHints(hints);
return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints);
}

static partial void CustomizeResponseText(ParseResult parseResult, global::tryAGI.OpenAI.ProjectSpendLimitDeletedResource value, ref string? text);
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


public static Command Create()
{
var command = new Command(@"delete-project-spend-limit", @"Delete a project's hard spend limit.");
command.Arguments.Add(ProjectId);


command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) =>
await CliRuntime.RunAsync(async () =>
{
var projectId = parseResult.GetRequiredValue(ProjectId);
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


var response = await client.DeleteProjectSpendLimitAsync(
projectId: projectId,
cancellationToken: cancellationToken).ConfigureAwait(false);


await CliRuntime.WriteResponseAsync(
parseResult,
response,
global::tryAGI.OpenAI.SourceGenerationContext.Default,
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
return command;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands;

internal static partial class RetrieveOrganizationSpendLimitCommandApiCommand
{


private static string FormatResponse(ParseResult parseResult, global::tryAGI.OpenAI.OrganizationSpendLimitResource value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
{
string? text = null;
CustomizeResponseText(parseResult, value, ref text);
if (!string.IsNullOrWhiteSpace(text))
{
return text;
}

var hints = new Dictionary<string, CliFormatHint>(StringComparer.OrdinalIgnoreCase)
{
};
CustomizeResponseFormatHints(hints);
return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints);
}

static partial void CustomizeResponseText(ParseResult parseResult, global::tryAGI.OpenAI.OrganizationSpendLimitResource value, ref string? text);
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


public static Command Create()
{
var command = new Command(@"retrieve-organization-spend-limit", @"Get the organization's hard spend limit.");



command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) =>
await CliRuntime.RunAsync(async () =>
{

using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


var response = await client.RetrieveOrganizationSpendLimitAsync(

cancellationToken: cancellationToken).ConfigureAwait(false);


await CliRuntime.WriteResponseAsync(
parseResult,
response,
global::tryAGI.OpenAI.SourceGenerationContext.Default,
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
return command;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#nullable enable
#pragma warning disable CS0618

using System.CommandLine;

namespace tryAGI.OpenAI.Cli.GeneratedApi.Commands;

internal static partial class RetrieveProjectSpendLimitCommandApiCommand
{
private static Argument<string> ProjectId { get; } = new(
name: @"project-id")
{
Description = @"The ID of the project whose hard spend limit is being managed.",
};

private static string FormatResponse(ParseResult parseResult, global::tryAGI.OpenAI.ProjectSpendLimitResource value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings)
{
string? text = null;
CustomizeResponseText(parseResult, value, ref text);
if (!string.IsNullOrWhiteSpace(text))
{
return text;
}

var hints = new Dictionary<string, CliFormatHint>(StringComparer.OrdinalIgnoreCase)
{
};
CustomizeResponseFormatHints(hints);
return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints);
}

static partial void CustomizeResponseText(ParseResult parseResult, global::tryAGI.OpenAI.ProjectSpendLimitResource value, ref string? text);
static partial void CustomizeResponseFormatHints(Dictionary<string, CliFormatHint> hints);


public static Command Create()
{
var command = new Command(@"retrieve-project-spend-limit", @"Get a project's hard spend limit.");
command.Arguments.Add(ProjectId);


command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) =>
await CliRuntime.RunAsync(async () =>
{
var projectId = parseResult.GetRequiredValue(ProjectId);
using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false);


var response = await client.RetrieveProjectSpendLimitAsync(
projectId: projectId,
cancellationToken: cancellationToken).ConfigureAwait(false);


await CliRuntime.WriteResponseAsync(
parseResult,
response,
global::tryAGI.OpenAI.SourceGenerationContext.Default,
FormatResponse,
cancellationToken).ConfigureAwait(false);
}, cancellationToken).ConfigureAwait(false));
return command;
}
}
Loading