-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Do not review] Testing TS Modular SDK generation #4
base: main
Are you sure you want to change the base?
Conversation
...operationOptionsToRequestParameters(options), | ||
contentType: (options.contentType as any) ?? "multipart/form-data", | ||
body: { | ||
file: uint8ArrayToString(audio["file"], "binary"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Compile Error]
src/api/operations.ts:148:49 - error TS2345: Argument of type '"binary"' is not assignable to parameter of type 'EncodingType'.
148 file: uint8ArrayToString(audio["file"], "binary")
object: result.body["object"], | ||
created: new Date(result.body["created"]), | ||
model: result.body["model"], | ||
choices: (result.body["choices"] ?? []).map((p) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Compile Error]
src/api/operations.ts:278:5 - error TS2322: Type '{ index: any; message: { role: any; content: any; functionCall: { name: any; arguments: any; } | undefined; }; finishReason: any; }[]' is not assignable to type '[]'.
Target allows only 0 element(s) but source may have more.
278 choices: (result.body["choices"] ?? []).map((p) => ({
id: result.body["id"], | ||
object: result.body["object"], | ||
createdAt: new Date(result.body["created_at"]), | ||
finishedAt: new Date(result.body["finished_at"]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Compile Error]
src/api/operations.ts:345:26 - error TS2769: No overload matches this call.
Overload 1 of 4, '(value: string | number | Date): Date', gave the following error.
Argument of type 'string | null' is not assignable to parameter of type 'string | number | Date'.
Type 'null' is not assignable to type 'string | number | Date'.
Overload 2 of 4, '(value: string | number): Date', gave the following error.
Argument of type 'string | null' is not assignable to parameter of type 'string | number'.
Type 'null' is not assignable to type 'string | number'.
345 finishedAt: new Date(result.body["finished_at"]),
validationFile: result.body["validation_file"], | ||
resultFiles: result.body["result_files"], | ||
trainedTokens: result.body["trained_tokens"], | ||
error: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Compile Error]
src/api/operations.ts:357:5 - error TS2322: Type '{ message: any; code: any; param: any; } | null' is not assignable to type 'null'.
Type '{ message: any; code: any; param: any; }' is not assignable to type 'null'.
357 error:
|
||
return { | ||
object: result.body["object"], | ||
data: (result.body["data"] ?? []).map((p) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Compile Error]
src/api/operations.ts:411:5 - error TS2322: Type '{ id: string; object: "fine_tuning.job"; createdAt: Date; finishedAt: Date; model: string; fineTunedModel: string | null; organizationId: string; status: any; hyperparameters: { ...; }; ... 4 more ...; error: { ...; } | null; }[]' is not assignable to type 'FineTuningJob[]'.
Type '{ id: string; object: "fine_tuning.job"; createdAt: Date; finishedAt: Date; model: string; fineTunedModel: string | null; organizationId: string; status: any; hyperparameters: { ...; }; ... 4 more ...; error: { ...; } | null; }' is not assignable to type 'FineTuningJob'.
|
||
export interface ListPaginatedFineTuningJobsResponse { | ||
object: string; | ||
data: FineTuningJob[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Compile Error]
src/models/models.ts:357:3
357 data: FineTuningJob[];
~~~~
The expected type comes from property 'data' which is declared here on type 'ListPaginatedFineTuningJobsResponse
*/ | ||
name?: string; | ||
/** The name and arguments of a function that should be called, as generated by the model. */ | ||
functionCall?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Compile Error] anonymous model
[Do not review] Testing TS Modular SDK generation
fixes Azure/autorest.typescript#2042