Path: blob/master/AI for Work/AI_for_Work_Consult_an_Expert:_Bankruptcy_Lawyer.ipynb
3121 views
AI for Work - 💸 Consult an Expert: Bankruptcy Lawyer
Tags: #aiforwork #chat #plugin #work #openai #prompt
Author: Ali Abassi
Last update: 2023-10-31 (Created: 2023-10-18)
Description: This notebook will show how to create a chat plugin to consult an expert: bankruptcy lawyer.
Input
Import libraries
Setup variables
Mandatory
plugin_name
: The name of the plugin display in Naas Chat.prompt
: The prompt used in the plugin
Optional
avatar
: Image URL to be displayed in the Naas Chat.model
: The name of the model to be used for tokenization. Models available: "gpt-3.5-turbo" (limited to 4097 tokens), "gpt-3.5-turbo-16k" (limited to 16385 tokens), and "gpt-4" (limited to 8192 tokens).temperature
: The temperature parameter for the model.output_path
: The path where the JSON file should be saved. If not provided, it will be created from the plugin name.
Model
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.
Output
Display plugin
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 last cell output.
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
.