Skip to content

Commit

Permalink
Merge pull request #5 from maxholman/qol20240720
Browse files Browse the repository at this point in the history
QOL updates July 2024
  • Loading branch information
maxholman authored Jul 20, 2024
2 parents cf0377c + 48d45c2 commit 703520c
Show file tree
Hide file tree
Showing 17 changed files with 1,513 additions and 1,368 deletions.
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/nullables.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`nullables 1`] = `
"import type { Jsonifiable } from 'type-fest';
"import type { Jsonifiable, Jsonify } from 'type-fest';
import type { JsonifiableObject } from 'type-fest/source/jsonifiable.js';
export type MySchemaLolOrNullable = "lol" | "kek" | null;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/fixtures/openai/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* WARN: Do not edit directly.
*
* Generated on 2024-05-27T10:54:46.817Z
* Generated on 2024-07-20T03:14:00.890Z
*
*/
/** eslint-disable max-classes */
Expand Down
318 changes: 159 additions & 159 deletions __tests__/fixtures/openai/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,206 +3,206 @@
*
* WARN: Do not edit directly.
*
* Generated on 2024-05-27T10:54:46.817Z
* Generated on 2024-07-20T03:14:00.890Z
*
*/
import {
RestServiceClient,
createIsomorphicNativeFetcher,
type RestServiceClientConfig,
} from '@block65/rest-client';
import {
type CreateChatCompletionCommandInput,
type CreateCompletionCommandInput,
type CreateEditCommandInput,
type CreateImageCommandInput,
type CreateImageEditCommandInput,
type CreateImageVariationCommandInput,
type CreateEmbeddingCommandInput,
type CreateSpeechCommandInput,
type CreateTranscriptionCommandInput,
type CreateTranslationCommandInput,
type ListFilesCommandInput,
type CreateFileCommandInput,
type DeleteFileCommandInput,
type RetrieveFileCommandInput,
type DownloadFileCommandInput,
type CreateFineTuningJobCommandInput,
type ListPaginatedFineTuningJobsCommandInput,
type RetrieveFineTuningJobCommandInput,
type ListFineTuningEventsCommandInput,
type CancelFineTuningJobCommandInput,
type CreateFineTuneCommandInput,
type ListFineTunesCommandInput,
type RetrieveFineTuneCommandInput,
type CancelFineTuneCommandInput,
type ListFineTuneEventsCommandInput,
type ListModelsCommandInput,
type RetrieveModelCommandInput,
type DeleteModelCommandInput,
type CreateModerationCommandInput,
type ListAssistantsCommandInput,
type CreateAssistantCommandInput,
type GetAssistantCommandInput,
type ModifyAssistantCommandInput,
type DeleteAssistantCommandInput,
type CreateThreadCommandInput,
type GetThreadCommandInput,
type ModifyThreadCommandInput,
type DeleteThreadCommandInput,
type ListMessagesCommandInput,
type CreateMessageCommandInput,
type GetMessageCommandInput,
type ModifyMessageCommandInput,
type CreateThreadAndRunCommandInput,
type ListRunsCommandInput,
type CreateRunCommandInput,
type GetRunCommandInput,
type ModifyRunCommandInput,
type SubmitToolOuputsToRunCommandInput,
type CancelRunCommandInput,
type ListRunStepsCommandInput,
type GetRunStepCommandInput,
type ListAssistantFilesCommandInput,
type CreateAssistantFileCommandInput,
type GetAssistantFileCommandInput,
type DeleteAssistantFileCommandInput,
type ListMessageFilesCommandInput,
type GetMessageFileCommandInput,
type CreateChatCompletionResponse,
type CreateCompletionResponse,
type CreateEditResponse,
type ImagesResponse,
type CreateEmbeddingResponse,
type CreateTranscriptionResponse,
type CreateTranslationResponse,
type ListFilesResponse,
type OpenAiFile,
type DeleteFileResponse,
type FineTuningJob,
type ListPaginatedFineTuningJobsResponse,
type ListFineTuningJobEventsResponse,
type FineTune,
type ListFineTunesResponse,
type ListFineTuneEventsResponse,
type ListModelsResponse,
type Model,
type DeleteModelResponse,
type CreateModerationResponse,
type ListAssistantsResponse,
type AssistantObject,
type DeleteAssistantResponse,
type ThreadObject,
type DeleteThreadResponse,
type ListMessagesResponse,
type MessageObject,
type RunObject,
type ListRunsResponse,
type ListRunStepsResponse,
type RunStepObject,
type ListAssistantFilesResponse,
type AssistantFileObject,
type DeleteAssistantFileResponse,
type ListMessageFilesResponse,
type MessageFileObject,
import type {
AssistantFileObject,
AssistantObject,
CancelFineTuneCommandInput,
CancelFineTuningJobCommandInput,
CancelRunCommandInput,
CreateAssistantCommandInput,
CreateAssistantFileCommandInput,
CreateChatCompletionCommandInput,
CreateChatCompletionResponse,
CreateCompletionCommandInput,
CreateCompletionResponse,
CreateEditCommandInput,
CreateEditResponse,
CreateEmbeddingCommandInput,
CreateEmbeddingResponse,
CreateFileCommandInput,
CreateFineTuneCommandInput,
CreateFineTuningJobCommandInput,
CreateImageCommandInput,
CreateImageEditCommandInput,
CreateImageVariationCommandInput,
CreateMessageCommandInput,
CreateModerationCommandInput,
CreateModerationResponse,
CreateRunCommandInput,
CreateSpeechCommandInput,
CreateThreadAndRunCommandInput,
CreateThreadCommandInput,
CreateTranscriptionCommandInput,
CreateTranscriptionResponse,
CreateTranslationCommandInput,
CreateTranslationResponse,
DeleteAssistantCommandInput,
DeleteAssistantFileCommandInput,
DeleteAssistantFileResponse,
DeleteAssistantResponse,
DeleteFileCommandInput,
DeleteFileResponse,
DeleteModelCommandInput,
DeleteModelResponse,
DeleteThreadCommandInput,
DeleteThreadResponse,
DownloadFileCommandInput,
FineTune,
FineTuningJob,
GetAssistantCommandInput,
GetAssistantFileCommandInput,
GetMessageCommandInput,
GetMessageFileCommandInput,
GetRunCommandInput,
GetRunStepCommandInput,
GetThreadCommandInput,
ImagesResponse,
ListAssistantFilesCommandInput,
ListAssistantFilesResponse,
ListAssistantsCommandInput,
ListAssistantsResponse,
ListFilesCommandInput,
ListFilesResponse,
ListFineTuneEventsCommandInput,
ListFineTuneEventsResponse,
ListFineTunesCommandInput,
ListFineTunesResponse,
ListFineTuningEventsCommandInput,
ListFineTuningJobEventsResponse,
ListMessageFilesCommandInput,
ListMessageFilesResponse,
ListMessagesCommandInput,
ListMessagesResponse,
ListModelsCommandInput,
ListModelsResponse,
ListPaginatedFineTuningJobsCommandInput,
ListPaginatedFineTuningJobsResponse,
ListRunsCommandInput,
ListRunsResponse,
ListRunStepsCommandInput,
ListRunStepsResponse,
MessageFileObject,
MessageObject,
Model,
ModifyAssistantCommandInput,
ModifyMessageCommandInput,
ModifyRunCommandInput,
ModifyThreadCommandInput,
OpenAiFile,
RetrieveFileCommandInput,
RetrieveFineTuneCommandInput,
RetrieveFineTuningJobCommandInput,
RetrieveModelCommandInput,
RunObject,
RunStepObject,
SubmitToolOuputsToRunCommandInput,
ThreadObject,
} from './types.js';

type AllInputs =
| CancelFineTuneCommandInput
| CancelFineTuningJobCommandInput
| CancelRunCommandInput
| CreateAssistantCommandInput
| CreateAssistantFileCommandInput
| CreateChatCompletionCommandInput
| CreateCompletionCommandInput
| CreateEditCommandInput
| CreateEmbeddingCommandInput
| CreateFileCommandInput
| CreateFineTuneCommandInput
| CreateFineTuningJobCommandInput
| CreateImageCommandInput
| CreateImageEditCommandInput
| CreateImageVariationCommandInput
| CreateEmbeddingCommandInput
| CreateMessageCommandInput
| CreateModerationCommandInput
| CreateRunCommandInput
| CreateSpeechCommandInput
| CreateThreadAndRunCommandInput
| CreateThreadCommandInput
| CreateTranscriptionCommandInput
| CreateTranslationCommandInput
| ListFilesCommandInput
| CreateFileCommandInput
| DeleteAssistantCommandInput
| DeleteAssistantFileCommandInput
| DeleteFileCommandInput
| RetrieveFileCommandInput
| DownloadFileCommandInput
| CreateFineTuningJobCommandInput
| ListPaginatedFineTuningJobsCommandInput
| RetrieveFineTuningJobCommandInput
| ListFineTuningEventsCommandInput
| CancelFineTuningJobCommandInput
| CreateFineTuneCommandInput
| ListFineTunesCommandInput
| RetrieveFineTuneCommandInput
| CancelFineTuneCommandInput
| ListFineTuneEventsCommandInput
| ListModelsCommandInput
| RetrieveModelCommandInput
| DeleteModelCommandInput
| CreateModerationCommandInput
| ListAssistantsCommandInput
| CreateAssistantCommandInput
| GetAssistantCommandInput
| ModifyAssistantCommandInput
| DeleteAssistantCommandInput
| CreateThreadCommandInput
| GetThreadCommandInput
| ModifyThreadCommandInput
| DeleteThreadCommandInput
| ListMessagesCommandInput
| CreateMessageCommandInput
| DownloadFileCommandInput
| GetAssistantCommandInput
| GetAssistantFileCommandInput
| GetMessageCommandInput
| ModifyMessageCommandInput
| CreateThreadAndRunCommandInput
| ListRunsCommandInput
| CreateRunCommandInput
| GetMessageFileCommandInput
| GetRunCommandInput
| ModifyRunCommandInput
| SubmitToolOuputsToRunCommandInput
| CancelRunCommandInput
| ListRunStepsCommandInput
| GetRunStepCommandInput
| GetThreadCommandInput
| ListAssistantFilesCommandInput
| CreateAssistantFileCommandInput
| GetAssistantFileCommandInput
| DeleteAssistantFileCommandInput
| ListAssistantsCommandInput
| ListFilesCommandInput
| ListFineTuneEventsCommandInput
| ListFineTunesCommandInput
| ListFineTuningEventsCommandInput
| ListMessageFilesCommandInput
| GetMessageFileCommandInput;
| ListMessagesCommandInput
| ListModelsCommandInput
| ListPaginatedFineTuningJobsCommandInput
| ListRunsCommandInput
| ListRunStepsCommandInput
| ModifyAssistantCommandInput
| ModifyMessageCommandInput
| ModifyRunCommandInput
| ModifyThreadCommandInput
| RetrieveFileCommandInput
| RetrieveFineTuneCommandInput
| RetrieveFineTuningJobCommandInput
| RetrieveModelCommandInput
| SubmitToolOuputsToRunCommandInput;
type AllOutputs =
| AssistantFileObject
| AssistantObject
| CreateChatCompletionResponse
| CreateCompletionResponse
| CreateEditResponse
| ImagesResponse
| CreateEmbeddingResponse
| void
| CreateModerationResponse
| CreateTranscriptionResponse
| CreateTranslationResponse
| ListFilesResponse
| OpenAiFile
| DeleteAssistantFileResponse
| DeleteAssistantResponse
| DeleteFileResponse
| FineTuningJob
| ListPaginatedFineTuningJobsResponse
| ListFineTuningJobEventsResponse
| FineTune
| ListFineTunesResponse
| ListFineTuneEventsResponse
| ListModelsResponse
| Model
| DeleteModelResponse
| CreateModerationResponse
| ListAssistantsResponse
| AssistantObject
| DeleteAssistantResponse
| ThreadObject
| DeleteThreadResponse
| FineTune
| FineTuningJob
| ImagesResponse
| ListAssistantFilesResponse
| ListAssistantsResponse
| ListFilesResponse
| ListFineTuneEventsResponse
| ListFineTunesResponse
| ListFineTuningJobEventsResponse
| ListMessageFilesResponse
| ListMessagesResponse
| MessageObject
| RunObject
| ListModelsResponse
| ListPaginatedFineTuningJobsResponse
| ListRunsResponse
| ListRunStepsResponse
| MessageFileObject
| MessageObject
| Model
| OpenAiFile
| RunObject
| RunStepObject
| ListAssistantFilesResponse
| AssistantFileObject
| DeleteAssistantFileResponse
| ListMessageFilesResponse
| MessageFileObject;
| ThreadObject
| void;

export class OpenAiApiRestClient extends RestServiceClient<
AllInputs,
Expand Down
4 changes: 2 additions & 2 deletions __tests__/fixtures/openai/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*
* WARN: Do not edit directly.
*
* Generated on 2024-05-27T10:54:46.817Z
* Generated on 2024-07-20T03:14:00.890Z
*
*/
import type { Jsonifiable } from 'type-fest';
import type { Jsonifiable, Jsonify } from 'type-fest';
import type { JsonifiableObject } from 'type-fest/source/jsonifiable.js';

export type DeleteModelResponse = {
Expand Down
Loading

0 comments on commit 703520c

Please sign in to comment.