-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Confirm this is a Node library issue and not an underlying OpenAI API issue
- This is an issue with the Node library
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();
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
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation