Path: blob/master/GitHub/GitHub_Create_plugin_with_commands.ipynb
2973 views
GitHub - Create plugin with commands
Tags: #github #naaschatplugin #naas #naas_driver
Author: Florent Ravenel
Last update: 2023-09-28 (Created: 2023-09-28)
Description: This notebook creates a Naas Chat plugin using commands from GitHub templates.
Input
Import libraries
Setup variables
Mandatory
name
: The name of the plugin.system_prompt
: The system prompt for the plugin.input_dir
: The path where the webhooks should be stored. By default, you can access all templates in your Naas Lab in "/home/ftp/templates/"
Optional
body
: This variable stores the body to be send by the webhook.model
: The name of the model to be used for tokenization. Default is "gpt-3.5-turbo-16k".temperature
: The temperature parameter for the model. Default is 0.output_path
: The path where the JSON file should be saved. If not provided, it will be created from the plugin name.
Model
Push Webhook to production
Webhook URL to be included in command of your Naas Chat plugin.
Create command
Modify payload with parameters
Output
Create Naas Chat plugin
This function will generate the plugin in JSON format and also verify if your prompt adheres to the recommended limit, which is set at 20% of the maximum tokens allowed by the model. Then, it will save your plugin in your local environment.
Create asset
This asset can be utilized by using the command /use
in your Naas Chat or by simply clicking on the link provided in the cell below.
Create new chat
You don't need to click on 'Create New Chat' everytime you update your system prompt, you can use the command /refresh
.