Path: blob/master/Anthropic/Anthropic_Chat_with_Claude_v2.1.ipynb
2973 views
Anthropic - Chat with Claude v2.1
Tags: #anthropic #claude #ai #llm #model #plugin #amazon #bedrock
Author: Florent Ravenel
Last update: 2023-12-12 (Created: 2023-12-12)
Description: This notebook will show how to chat with Claude v2.1 model from Anthropic.
Input
Import libraries
Setup variables
Mandatory
name
: The name of the plugin.prompt
: The prompt for the plugin.model
: The name of the model to be used for tokenization.
Optional
avatar
: Image URL to be displayed in the Naas Chat.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
The cell below is tagged as 'plugin'. This tag will allow us to use this pre-prompt on our Naas Chat. NB: The plugin must be printed.
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
.