Skip to content

klu-ai/klu-nextjs

Repository files navigation

Klu SDK Next.js App Cover

An example of Klu SDK using Next.js app to interact with your Klu's actions

Klu SDK Next.js Example App Repo

Introduction · Config for App · One Click to Deploy · Contributing


Introduction

This is a Klu SDK Next.js example app to interact with your Klu Actions. This template sets a default Action and supports adding more Actions in the future without config changes. Additional Actons save locally for each user.

With this example app you can:

  • Generate text
  • Batch generations with CSV
  • Regenerate, copy, and save generations
  • Feedback the responses
  • Manage your saved generations

Additional added Actions, generated responses, and saved generations are saved locally for individual user flexibility and privacy.

Config for App

Whether deploying to Vercel or running locally, you need to add two variables: your Klu API Key and the Action GUID.

  • KLU_API_KEY – your Klu API key (find yours here)
  • NEXT_PUBLIC_KLU_ACTION_GUID - your initial Action GUID (found in your Action Deploy modal)

1-Click Deploy on Vercel

You can deploy your own version of this app by clicking this button:

Deploy with Vercel

Setting Up Locally

To set up the app locally, you'll need to clone the repository, rename .env.sample to .env, and set your environment variables.

Then, run the development server:

pnpm dev
# or
npm run dev
# or
yarn dev

Contributing

Here's how you can contribute:

  • Open an issue if you believe you've encountered a bug.
  • Make a pull request to add new features/make quality-of-life improvements/fix bugs.

About

Klu SDK example app using Next.js to interact with Klu Actions

Resources

Stars

Watchers

Forks

Languages