Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@cocreate/openai

CoCreate-app102AGPL-3.01.12.2

Integrates OpenAI's API into web applications, offering easy access to AI-driven features via a JavaScript object interface and HTML5 attributes.

openai, cocreate, low-code-framework, ai-integration, web-applications, javascript-api, html5-attributes, ai-driven-features, machine-learning, natural-language-processing, image-generation, deep-learning, cocreate-framework, html5-framework, javascript-framework

readme

CoCreate-openai

CoCreate-openai brings the power of OpenAI's advanced AI and machine learning models directly to your web applications. By integrating the OpenAI API, this module enables developers and content creators to easily incorporate AI-driven features such as text generation, language understanding, and more, through both a JavaScript object interface and HTML5 attributes.

minified gzip brotli GitHub latest release License Hiring

Features

  • Seamless OpenAI Integration: Effortlessly connect to OpenAI's API to leverage its AI models in your projects.
  • JavaScript Object Interface: Access OpenAI's capabilities programmatically with a simple JavaScript API, allowing for dynamic and complex AI interactions.
  • HTML5 Attribute Access: Initiate AI features directly from HTML with custom attributes, making advanced AI functionalities accessible with minimal coding.
  • Versatile AI Applications: From generating text content and understanding natural language to more sophisticated AI tasks, the possibilities are vast and versatile.
  • Easy to Implement: Designed for ease of use, CoCreate-openai is suitable for developers of all skill levels looking to enhance their projects with AI features.

CoCreate-openai

Docs & Demo

For a complete guide and working demo refer to the doumentation

CDN

<script src="https://cdn.cocreate.app/openai/latest/CoCreate-openai.min.js"></script>
<script src="https://cdn.cocreate.app/openai/latest/CoCreate-openai.min.css"></script>

NPM

$ npm i @cocreate/openai

yarn

$ yarn install @cocreate/openai

Table of Contents

Announcements

All updates to this library are documented in our CHANGELOG and releases. You may also subscribe to email for releases and breaking changes.

Roadmap

If you are interested in the future direction of this project, please take a look at our open issues and pull requests. We would love to hear your feedback.

About

CoCreate-openai is guided and supported by the CoCreate Developer Experience Team.

Please Email the Developer Experience Team here in case of any queries.

CoCreate-openai is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.

How to Contribute

We encourage contribution to our libraries (you might even score some nifty swag), please see our CONTRIBUTING guide for details.

We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create issues and pull requests or merely upvote or comment on existing issues or pull requests.

We appreciate your continued support, thank you!

License

This software is dual-licensed under the GNU Affero General Public License version 3 (AGPLv3) and a commercial license.

  • Open Source Use: For open-source projects and non-commercial use, this software is available under the AGPLv3. The AGPLv3 allows you to freely use, modify, and distribute this software, provided that all modifications and derivative works are also licensed under the AGPLv3. For the full license text, see the LICENSE file.

  • Commercial Use: For-profit companies and individuals intending to use this software for commercial purposes must obtain a commercial license. The commercial license is available when you sign up for an API key on our website. This license permits proprietary use and modification of the software without the copyleft requirements of the AGPLv3. It is ideal for integrating this software into proprietary commercial products and applications.

If you have not purchased a commercial license and intend to use this software for commercial purposes, you are required to sign up for an API key on our website.

changelog

1.12.2 (2025-05-01)

Bug Fixes

1.12.1 (2025-04-11)

Bug Fixes

  • dispatch end event on action element rather than document (5b57243)

1.12.0 (2024-11-04)

Bug Fixes

  • pretier.config.js and file formating (49b03f8)

Features

  • add prettier.config.js and format files (dd0d20e)
  • add prettier.config.js and format files (85cee57)

1.11.3 (2024-06-30)

Bug Fixes

  • parser uses match to return matched content only (154e2d0)

1.11.2 (2024-06-23)

Bug Fixes

1.11.1 (2024-06-23)

Bug Fixes

1.11.0 (2024-06-19)

Features

  • openai-value-type to define structure of data before applying to conversation (94a8654)

1.10.0 (2024-06-12)

Bug Fixes

Features

  • define selectors to target and valu-types to parse for (ebf446f)

1.9.2 (2024-04-29)

Bug Fixes

  • bump cocreate dependencies (64ae486)

1.9.1 (2024-04-26)

Bug Fixes

1.9.0 (2024-04-26)

Bug Fixes

  • mereg (0ddef1e)
  • replaced keyword spaces with hyphens and lowercase letters only (2ff22b6)
  • update method to match openai model (1e0ed6e)
  • update to support lazyloader (server) (bd1ef2d)

Features

  • server side handled dynamically using lazyloader (server) (cd718d5)

1.8.1 (2024-04-26)

Bug Fixes

1.8.0 (2024-04-26)

Bug Fixes

  • update method to match openai model (24bd449)
  • update to support lazyloader (server) (e6ef534)

Features

  • server side handled dynamically using lazyloader (server) (03d5f5d)

1.7.4 (2024-03-18)

Bug Fixes

  • replaced keyword spaces with hyphens and lowercase letters only (5b3ba63)

1.7.3 (2024-03-18)

Bug Fixes

1.7.2 (2024-02-05)

Bug Fixes

1.7.1 (2024-01-30)

Bug Fixes

1.7.0 (2024-01-08)

Features

  • bumped CoCreate dependencies to their latest versions (da6debf)

1.6.3 (2023-12-28)

Bug Fixes

1.6.2 (2023-12-18)

Bug Fixes

  • removed un genralized code (44764fc)

1.6.1 (2023-12-15)

Bug Fixes

1.6.0 (2023-12-09)

Features

  • simplified usage to support lazyloader (22323b2)

1.5.0 (2023-12-01)

Bug Fixes

Features

  • spoourts using apiKey passed to it or crud read apikey (150f128)

1.4.0 (2023-11-25)

Features

  • upgrade dependencies for latest features and fixes (43e9e29)

1.3.0 (2023-11-25)

Bug Fixes

  • pass attributes renamed to state (70fd5ad)
  • update nav, edit button and css path (8575d49)

Features

  • upgrade dependencies for latest features and fixes (d414192)

1.2.0 (2023-11-19)

Bug Fixes

  • client.js file name and relocated openai to server (f564017)
  • path (bcd46c8)

Features

  • export function send (321acb6)
  • update dependecies for th latest features and bug fixes (bdb3319)
  • use params recieved from client (68f36ce)

1.1.0 (2023-11-18)

Bug Fixes

Features

  • handle various data types returned from elements (0bba9eb)

1.0.14 (2023-11-16)

Bug Fixes

  • get apikey from localstorage (bc68cfb)

1.0.13 (2023-11-12)

Bug Fixes

  • bump dependencies for latest features (9a82b7f)
  • relocated persit function out of init (4385554)
  • removed manifest from demo (2896b36)

1.0.12 (2023-11-09)

Bug Fixes

1.0.11 (2023-10-25)

Bug Fixes

1.0.10 (2023-10-17)

Bug Fixes

1.0.9 (2023-10-14)

Bug Fixes

  • bump dependencies (3b4068b)
  • update pass-refresh to pass-overwrite (121fc87)

1.0.8 (2023-10-09)

Bug Fixes

1.0.7 (2023-10-09)

Bug Fixes

1.0.6 (2023-09-18)

Bug Fixes

  • Add path and pathname (fe9ca90)
  • Update CoCreate depndencies to latest versions (f1c1547)

1.0.5 (2023-09-07)

Bug Fixes

  • removed unused dependencies (c25ed6c)

1.0.4 (2023-09-07)

Bug Fixes

1.0.3 (2023-09-07)

Bug Fixes

1.0.2 (2023-09-07)

Bug Fixes

1.0.1 (2023-09-07)

Bug Fixes

1.0.0 (2023-09-07)

Bug Fixes

Features

  • Import Actions from '@cocreate/actions' and make several changes to the componentsReference object. Add new components and their respective functions, data, and html-attributes. Additionally, update the apiUrl and max_tokens values and make changes to the send function. (d022a66)
  • Initial Release (7624f3a)