-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update TODO spec and regenerate openai specs with new MFD
- Loading branch information
Showing
29 changed files
with
933 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
packages/typespec-test/test/ai/generated/typespec-ts/src/static-helpers/multipartHelpers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
/** | ||
* Valid values for the contents of a binary file. | ||
*/ | ||
export type FileContents = | ||
| string | ||
| NodeJS.ReadableStream | ||
| ReadableStream<Uint8Array> | ||
| Uint8Array | ||
| Blob; | ||
|
||
export function createFilePartDescriptor( | ||
partName: string, | ||
fileInput: any, | ||
defaultContentType?: string, | ||
): any { | ||
if (fileInput.contents) { | ||
return { | ||
name: partName, | ||
body: fileInput.contents, | ||
contentType: fileInput.contentType ?? defaultContentType, | ||
filename: fileInput.filename, | ||
}; | ||
} else { | ||
return { | ||
name: partName, | ||
body: fileInput, | ||
contentType: defaultContentType, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...pec-test/test/openai_generic/generated/typespec-ts/src/static-helpers/multipartHelpers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
/** | ||
* Valid values for the contents of a binary file. | ||
*/ | ||
export type FileContents = | ||
| string | ||
| NodeJS.ReadableStream | ||
| ReadableStream<Uint8Array> | ||
| Uint8Array | ||
| Blob; | ||
|
||
export function createFilePartDescriptor( | ||
partName: string, | ||
fileInput: any, | ||
defaultContentType?: string, | ||
): any { | ||
if (fileInput.contents) { | ||
return { | ||
name: partName, | ||
body: fileInput.contents, | ||
contentType: fileInput.contentType ?? defaultContentType, | ||
filename: fileInput.filename, | ||
}; | ||
} else { | ||
return { | ||
name: partName, | ||
body: fileInput, | ||
contentType: defaultContentType, | ||
}; | ||
} | ||
} |
Oops, something went wrong.