Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
In the documentation, openai.files.content is described as returns content as string type.
However, it returns raw Response type.
import OpenAI from "openai";
const openai = new OpenAI();
async function main() {
const file = await openai.files.content("file-abc123");
console.log(file); // Expected to show a string (ref. https://platform.openai.com/docs/api-reference/files/retrieve-contents)
}
main();
Output:

To Reproduce
- Write the code above (copy&pasted from https://platform.openai.com/docs/api-reference/files/retrieve-contents)
- It shows
file is a Response object
Code snippets
No response
OS
macOS
Node version
Node v18.17.0
Library version
openai v4.53.1
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
In the documentation,
openai.files.contentis described as returns content as string type.However, it returns raw Response type.
Output:

To Reproduce
fileis a Response objectCode snippets
No response
OS
macOS
Node version
Node v18.17.0
Library version
openai v4.53.1