Skip to content

Commit 67715b0

Browse files
committed
chore: regernerated correct fixtures
1 parent 44d652d commit 67715b0

6 files changed

Lines changed: 227 additions & 217 deletions

File tree

__tests__/fixtures/openai/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2023-04-29T03:20:30.391Z
6+
* Generated on 2023-05-11T04:29:04.091Z
77
*
88
*/
99
import {

__tests__/fixtures/openai/types.ts

Lines changed: 56 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2023-04-28T12:24:57.414Z
6+
* Generated on 2023-05-11T04:29:04.091Z
77
*
88
*/
9+
import type { Jsonifiable } from 'type-fest';
10+
import type { JsonifiableObject } from 'type-fest/source/jsonifiable.js';
11+
912
export type DeleteModelResponse = {
1013
id: string;
1114
object: string;
@@ -88,7 +91,7 @@ export type CreateCompletionRequest = {
8891
* @default 1
8992
*/
9093
best_of?: number | null;
91-
logit_bias?: {} | undefined;
94+
logit_bias?: JsonifiableObject | null;
9295
/**
9396
* A unique identifier representing your end-user, which can help OpenAI to
9497
* monitor and detect abuse. [Learn
@@ -109,7 +112,7 @@ export type CreateCompletionResponse = {
109112
| {
110113
tokens?: string[];
111114
token_logprobs?: number[];
112-
top_logprobs?: Array<{}>;
115+
top_logprobs?: JsonifiableObject[];
113116
text_offset?: number[];
114117
}
115118
| undefined;
@@ -123,15 +126,6 @@ export type CreateCompletionResponse = {
123126
}
124127
| undefined;
125128
};
126-
export type ChatCompletionRequestMessage = {
127-
/**
128-
* The role of the author of this message.
129-
* @enum system,user,assistant
130-
*/
131-
role: 'system' | 'user' | 'assistant';
132-
content: string;
133-
name?: string | undefined;
134-
};
135129
export type ChatCompletionResponseMessage = {
136130
/**
137131
* The role of the author of this message.
@@ -208,7 +202,7 @@ export type CreateEditResponse = {
208202
| {
209203
tokens?: string[];
210204
token_logprobs?: number[];
211-
top_logprobs?: Array<{}>;
205+
top_logprobs?: JsonifiableObject[];
212206
text_offset?: number[];
213207
}
214208
| undefined;
@@ -483,7 +477,7 @@ export type CreateAnswerRequest = {
483477
* @default 1
484478
*/
485479
n?: number | null;
486-
logit_bias?: {} | undefined;
480+
logit_bias?: JsonifiableObject | null;
487481
return_metadata?: boolean | null | undefined;
488482
return_prompt?: boolean | null | undefined;
489483
/**
@@ -492,7 +486,7 @@ export type CreateAnswerRequest = {
492486
* `completion` and `file` objects for expansion.
493487
* @default
494488
*/
495-
expand?: never[];
489+
expand?: Jsonifiable[];
496490
/**
497491
* A unique identifier representing your end-user, which can help OpenAI to
498492
* monitor and detect abuse. [Learn
@@ -555,7 +549,7 @@ export type CreateClassificationRequest = {
555549
* @default 200
556550
*/
557551
max_examples?: number | null;
558-
logit_bias?: {} | undefined;
552+
logit_bias?: JsonifiableObject | null;
559553
return_prompt?: boolean | null | undefined;
560554
return_metadata?: boolean | null | undefined;
561555
/**
@@ -564,7 +558,7 @@ export type CreateClassificationRequest = {
564558
* `completion` and `file` objects for expansion.
565559
* @default
566560
*/
567-
expand?: never[];
561+
expand?: Jsonifiable[];
568562
/**
569563
* A unique identifier representing your end-user, which can help OpenAI to
570564
* monitor and detect abuse. [Learn
@@ -727,17 +721,15 @@ export type CreateTranslationRequest = {
727721
export type CreateTranslationResponse = {
728722
text: string;
729723
};
730-
export type Engine = {
731-
id: string;
724+
export type FineTuneEvent = {
732725
object: string;
733-
created: number | null;
734-
ready: boolean;
726+
created_at: number;
727+
level: string;
728+
message: string;
735729
};
736-
export type Model = {
737-
id: string;
730+
export type ListFineTuneEventsResponse = {
738731
object: string;
739-
created: number;
740-
owned_by: string;
732+
data: FineTuneEvent[];
741733
};
742734
export type OpenAiFile = {
743735
id: string;
@@ -747,21 +739,39 @@ export type OpenAiFile = {
747739
filename: string;
748740
purpose: string;
749741
status: string;
750-
status_details: {};
742+
status_details: JsonifiableObject | null;
751743
};
752-
export type FineTuneEvent = {
744+
export type FineTune = {
745+
id: string;
753746
object: string;
754747
created_at: number;
755-
level: string;
756-
message: string;
748+
updated_at: number;
749+
model: string;
750+
fine_tuned_model: string | null;
751+
organization_id: string;
752+
status: string;
753+
hyperparams: JsonifiableObject;
754+
training_files: OpenAiFile[];
755+
validation_files: OpenAiFile[];
756+
result_files: OpenAiFile[];
757+
events: FineTuneEvent[];
757758
};
758-
export type ListEnginesResponse = {
759+
export type ListFineTunesResponse = {
759760
object: string;
760-
data: Engine[];
761+
data: FineTune[];
761762
};
762-
export type ListModelsResponse = {
763+
export type ListFilesResponse = {
763764
object: string;
764-
data: Model[];
765+
data: OpenAiFile[];
766+
};
767+
export type ChatCompletionRequestMessage = {
768+
/**
769+
* The role of the author of this message.
770+
* @enum system,user,assistant
771+
*/
772+
role: 'system' | 'user' | 'assistant';
773+
content: string;
774+
name?: string | undefined;
765775
};
766776
export type CreateChatCompletionRequest = {
767777
model: string;
@@ -803,7 +813,7 @@ export type CreateChatCompletionRequest = {
803813
max_tokens?: number;
804814
presence_penalty?: number | null;
805815
frequency_penalty?: number | null;
806-
logit_bias?: {} | undefined;
816+
logit_bias?: JsonifiableObject | null;
807817
/**
808818
* A unique identifier representing your end-user, which can help OpenAI to
809819
* monitor and detect abuse. [Learn
@@ -812,32 +822,25 @@ export type CreateChatCompletionRequest = {
812822
*/
813823
user?: string | undefined;
814824
};
815-
export type ListFilesResponse = {
825+
export type Model = {
826+
id: string;
816827
object: string;
817-
data: OpenAiFile[];
828+
created: number;
829+
owned_by: string;
818830
};
819-
export type ListFineTunesResponse = {
831+
export type ListModelsResponse = {
820832
object: string;
821-
data: unknown[];
833+
data: Model[];
822834
};
823-
export type ListFineTuneEventsResponse = {
835+
export type Engine = {
836+
id: string;
824837
object: string;
825-
data: FineTuneEvent[];
838+
created: number | null;
839+
ready: boolean;
826840
};
827-
export type FineTune = {
828-
id: string;
841+
export type ListEnginesResponse = {
829842
object: string;
830-
created_at: number;
831-
updated_at: number;
832-
model: string;
833-
fine_tuned_model: string | null;
834-
organization_id: string;
835-
status: string;
836-
hyperparams: {};
837-
training_files: OpenAiFile[];
838-
validation_files: OpenAiFile[];
839-
result_files: OpenAiFile[];
840-
events: FineTuneEvent[];
843+
data: Engine[];
841844
};
842845
export type ListEnginesCommandInput = void;
843846
export type ListEnginesCommandBody = void;

__tests__/fixtures/petstore/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2023-04-29T03:20:23.373Z
6+
* Generated on 2023-05-11T04:28:59.980Z
77
*
88
*/
99
import {

__tests__/fixtures/petstore/types.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2023-04-28T12:24:51.108Z
6+
* Generated on 2023-05-11T04:28:59.980Z
77
*
88
*/
9-
export type NewPet = {
10-
name: string;
11-
tag?: string | undefined;
12-
};
9+
import type { Jsonifiable } from 'type-fest';
10+
import type { JsonifiableObject } from 'type-fest/source/jsonifiable.js';
11+
1312
export type Error = {
1413
code: number;
1514
message: string;
1615
};
16+
export type NewPet = {
17+
name: string;
18+
tag?: string | undefined;
19+
};
1720
export type Pet = NewPet & {
1821
id: number;
1922
};

__tests__/fixtures/test1/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2023-04-29T03:20:25.967Z
6+
* Generated on 2023-05-11T04:29:01.276Z
77
*
88
*/
99
import {

0 commit comments

Comments
 (0)