Git Product home page Git Product logo

headless-cms-gpt-sdk's Introduction

FocusReactive logo

Headless CMS AI SDK playground

Goal

The main idea of the project is to provide a set of tools for easy integration of the most common AI functions into any applications.

As an example of usage, we provide an extension of the functionality of two popular headless CMS - Sanity and StoryBlok by implementing plugins that allow using AI functions within these headless CMS.

StoryBlok plugin

Here is an example plugin that allows you to translate your stories into another language while preserving the data structure and formatting.

FocusReactive logo

In addition to this, the plugin is capable of working with tags and document summarization.

Sanity plugin

Similar functionality is implemented for Sanity as well, using document actions.

FocusReactive logo

In addition to translations, this plugin also supports working with tags and document summarization, with the specific implementation depending on the Sanity API.

Result

Both plugins are built on top of SDKs, which are created separately for StoryBlok and Sanity. Each SDK uses a root package that is not limited to any CMS and can be used in any project.

Sanity Development

Install

yarn

ENV

Create .env.local inside sanity-studio-playground package, check the example in .env.local.example

Run

yarn dev

StoryBlok Development

Install

yarn

Set up a secure tunnel to proxy your request to/from localhost:3000, for example with ngrok:

yarn dev:ngrok

Note down your assigned URL; this will be your baseUrl for the application.

Create an app in Storyblok's Partner Portal and configure the following properties with the values derived from your baseUrl:

  • URL to your app: {baseUrl}
  • OAuth2 callback URL: {baseUrl}/api/authenticate/storyblok/callback

Rename the file .env.local.example to .env.local. Open the file and set the environmental variables:

  • CLIENT_ID: the client id from the app settings page.
  • CLIENT_SECRET: the client secret from the app settings page.
  • BASE_URL: The baseUrl from your secure tunnel.
  • NEXT_PUBLIC_OPENAI_TOKEN: OpenAI token.
  • NEXT_PUBLIC_SB_PREVIEW_TOKEN: OpenAI token.

Start the application with the script from the root folder

yarn dev:sb

headless-cms-gpt-sdk's People

Contributors

alexhramovich avatar o8o0o8o avatar pixelscommander avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.