Skip to content

eniewold/chatkit-wrapper-nuxt

Repository files navigation

ChatKit Vue Proxy Server (Nuxt)

This is the companion proxy server for the ChatKit Vue component.

This package will install a Proxy Server into your Nuxt environment and will take care of traffic between the ChatKit Vue component and OpenAI API servers.

Features

  • Easy integration of ChatKit Web Component in Vue 3 and Nuxt projects.
  • Proxy server API calls to keep your OpenAI API key secure (Nuxt SSR).

Requirements

Installation

Install the package via npm or yarn:

npm install chatkit-wrapper-nuxt

Update the modules section of your nuxt.config.ts:

export default defineNuxtConfig({
  modules: ['chatkit-wrapper-nuxt']
})

Update your .env file or set environment variables:

# Your secret OpenAI API Key
CHATKIT_OPENAI_API_KEY=your_openai_api_key_here

# OpenAI end-point for ChatKit calls, defaults to https://api.openai.com/v1/
CHATKIT_OPENAI_API_ENDPOINT=https://api.openai.com/v1/  

FAQ / Common Errors

  • When you get a OpenAI key not found in environment and/or config. error in your command prompt console, make sure you have correctly configured the environment variables.

  • Version History

  • 0.3.5 - Dependency with chatkit-wrapper-vue moved to playground (where it belongs)

  • 0.3.4 - Explicit import of some vue methods

  • 0.3.3 - Small fixes to exported types

  • 0.3.2 - First public package update

  • 0.2.0 - Added support for event listeners, you can now trigger functions on events triggered by the OpenAI ChatKit.

  • 0.1.1 - Implemented all support properties on component as pass-through and with default functionality or default values.

  • 0.1.0 - Initial version with functional wrapper.

LICENSE

This package includes the ChatKit Web Component bundle ([Apache 2.0])(./LICENSE) sourced from OpenAI. See NOTICE-OPENAI for details.

About

ChatKit (from OpenAI) chat window component for Nuxt (with proxy server)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published