You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need to support NodeJS.ReadableStream | Blob | ArrayBuffer | ArrayBufferView in Typespec code generation for base64 sources
Document Intelligence
Typespec
@doc("Document analysis parameters.")
model AnalyzeDocumentRequest {
@doc("Document URL to analyze. Either urlSource or base64Source must be specified.")
urlSource?: url;
@doc("""
Base64 encoding of the document to analyze. Either urlSource or base64Source
must be specified.
""")
base64Source?: bytes;
}
/** Document analysis parameters. */exportinterfaceAnalyzeDocumentRequest{/** Document URL to analyze. Either urlSource or base64Source must be specified. */urlSource?: string;/** * Base64 encoding of the document to analyze. Either urlSource or base64Source * must be specified. */base64Source?: string;}
In the older Form Recognizer library, we used to support..
/** * A request input that can be uploaded as binary data to the Form Recognizer service. Form Recognizer treats `string` * inputs as URLs, so to send a string as a _binary_ input, first convert the string to one of the following input * types. */exporttypeFormRecognizerRequestBody=|NodeJS.ReadableStream|Blob|ArrayBuffer|ArrayBufferView;publicasyncbeginAnalyzeDocument(modelId: string,document: FormRecognizerRequestBody,options?: AnalyzeDocumentOptions): Promise<AnalysisPoller>;publicasyncbeginAnalyzeDocumentFromUrl(modelId: string,documentUrl: string,options?: AnalyzeDocumentOptions): Promise<AnalysisPoller>;
The ask here is to support NodeJS.ReadableStream | Blob | ArrayBuffer | ArrayBufferView in Typespec code generation for base64 sources instead of asking users to provide base64 sources.
The text was updated successfully, but these errors were encountered:
HarshaNalluru
changed the title
[Typespec] Handling Base64 sources
[Codegen/Typespec] Handling Base64 sources
Nov 17, 2023
Need to support
NodeJS.ReadableStream | Blob | ArrayBuffer | ArrayBufferView
in Typespec code generation for base64 sourcesDocument Intelligence
Typespec
Source - https://github.com/Azure/azure-rest-api-specs/blob/eaf8b6f8e3ae429c8100471a9772a4bee9a5e472/specification/ai/DocumentIntelligence/models.tsp#L288C1-L298C2
Generated code
User Sample
Form Recognizer
In the older Form Recognizer library, we used to support..
User sample
Feature Request
The ask here is to support
NodeJS.ReadableStream | Blob | ArrayBuffer | ArrayBufferView
in Typespec code generation for base64 sources instead of asking users to provide base64 sources.The text was updated successfully, but these errors were encountered: