Not Monitored
Tag not monitored by Microsoft.
43,358 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Will there be support for PDF files as base64 for the OpenAI SDK?
export namespace ChatCompletionContentPart {
/**
* Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text
* generation.
*/
export interface File {
file: File.File;
/**
* The type of the content part. Always `file`.
*/
type: 'file';
}
export namespace File {
export interface File {
/**
* The base64 encoded file data, used when passing the file to the model as a
* string.
*/
file_data?: string;
/**
* The ID of an uploaded file to use as input.
*/
file_id?: string;
/**
* The name of the file, used when passing the file to the model as a string.
*/
file_name?: string;
}
}
}
If I use it I'm getting this error:
{
"error": {
"message": "Unknown parameter: 'messages[2].content[0].file.file_name'.",
"type": "invalid_request_error",
"param": "messages[2].content[0].file.file_name",
"code": "unknown_parameter"
}
}
I've asked the question again with the right tag: https://learn.microsoft.com/en-us/answers/questions/2238965/support-for-pdf-files-as-base64-of-the-openai-sdk
I can not delete this question for some reason.