- Initialization: The SDK allows for easy initialization using your OpenAI API key.
- Completion API Call: This feature lets developers obtain completions from the OpenAI model. Parameters like engine, prompt, max tokens, temperature, and more can be specified to customize the response.
- Search API Call: Developers can use this to search within specified documents using a query.
- Answers API Call: This call is designed to retrieve answers based on provided documents, a question, and other parameters.
- Classification API Call: It allows for text classification based on provided examples and labels.
- Engines API Call: This call provides information about the available engines.
- Embeddings API Call: Developers can obtain embeddings for specified input texts.
- Token Count: Although not supported as of 4/21, there’s a method that allows developers to determine the number of tokens in a given prompt without making an API call.
- Independence: This SDK is not officially affiliated with OpenAI, showcasing the developer’s initiative and interest in the OpenAI ecosystem.
- Community Engagement: The developer encourages feedback, improvements, and issue reporting, fostering a community-driven approach to refining the SDK.
- Ease of Installation: The SDK can be easily integrated into projects using npm with the command
npm i openai-api.
- Documentation Links: The SDK provides direct links to official OpenAI documentation, such as the one for embeddings, ensuring users have access to comprehensive information.
This SDK serves as a bridge between Node.js applications and the powerful capabilities of OpenAI’s GPT-3, making it easier for developers to harness the potential of this advanced language model.