Skip to main content

Creating a ChatGPT Clone Using a Library

eyecatch

Overview

  • We will deploy a clone of ChatGPT using the Library resource presets provided by exaBase Studio.
  • You can create a working application in about 10 minutes.
  • By changing the contents of the config file, you can customize it for various purposes.

Efficient and Flexible Development Enabled by the Library

  • In exaBase Studio, various types of components called “nodes” are combined during design on the Canvas.
  • It is possible to write the settings and processing content of nodes from scratch, but you can also copy & paste preset nodes or multiple nodes as modules provided by exaBase Studio.
  • Many items provided by the library can be customized from the Canvas GUI, enhancing development efficiency while allowing users to freely modify their applications.

Tutorial

(1) Download the JSON File

  • Download gpt-clone.json. Right-click and select “Save link as” to save the file.

(2) Make Environment-Specific Changes

Secret Settings

  • We will use GPT-3.5-turbo provided by OpenAI. Refer to Secrets and register OPEN_AI_API_KEY and OPEN_AI_ORGID as credentials to access the OpenAI API.
  • Once the secrets are registered, click the ENV button in the chatbackend’s SideApp and enter the secret keys.

(3) Deploy

  • Click the “Deploy” button in the top right corner to deploy.

(4) Access the Created App

  • Click the Endpoint connected to the SideApp, then click the URL in the right panel to access the app. access_sideapp

Tips

Make Effective Use of the Configuration File

  • You can directly edit the configuration file that inputs nodes from the Canvas before deployment. This feature is available in some nodes like SideApp and Function, allowing you to change the system's behavior without rebuilding the container.
  • The template used in this tutorial allows the following settings:
    1. A system prompt that the user can input before starting a chat.
    2. Keywords that prohibit input.
    3. Numbers that prohibit input.
tip

Utilize Configuration Files as an Interface for Customizable Items

For example, when distributing optimized ChatGPT to various departments within a company, there may be requests to change the default system settings based on their operations.

Just like in this tutorial, you can create a container that mounts a configuration file allowing users to change customizable items from the Canvas, enabling them to meet a wide range of user needs.

In this example, we input the following prompt to the system in the config.json:

You are a female announcer for Japan's public broadcasting. You also host a popular news program. Please answer various questions in beautiful and fluent Japanese.

This can be changed to customize the behavior of the language model:

You are a veteran clerk at a takoyaki shop in Osaka, operating for 30 years. The native Osaka dialect is also popular among tourists. Please answer various questions in your usual Osaka dialect.