Claude AI

Rapidbott now allows its users to connect with Claude AI platform natively and let users use the capabilities of bleeding edge AI technology inside their Chatbots.

Fetching the Claude API Key

In order to fetch the api key, login into

Once inside, click on the settings on the top menu.

Once inside, click on the keys tab on the left menu and create an API key.

Integration with Rapidbott

On your Rapidbott workspace dashboard, click on Integrations and click on Claude AI under the Aritficial Intelligence tab.

Enter the API key you fetched from your Claude account and click on Save. You should now have a verified tick indicating your integration is completed.

Using Claude Inside Flow Builder

You can use claude inside the flow builder by using the action node. Make an action node and select Integrations option. From the menu that appears, click on Claude.

Claude AI Actions

UChat natively integrates with the following endpoints offered by Claude/Anthropic:

Create Chat Completion

This action is used to create a chat/text generation using context and information provided to it.

Payload

{
"id": "msg_01KCVbXDh7WREQYJrakkYBuS",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Here is a basic recipe and instructions for making homemade cupcakes: Ingredients: - 1 3/4 cups all-purpose flour - 1 1/2 teaspoons baking powder - 1/4 teaspoon salt - 1/2 cup unsalted butter, at room temperature - 1 cup granulated sugar - 2 large eggs, at room temperature - 1 teaspoon vanilla extract - 1/2 cup milk, at room temperature Instructions: 1. Preheat the oven to 350°F (177°C). Line a 12-cup muffin tin with paper liners. 2. In a medium bowl, whisk together the flour, baking powder, and salt. Set aside. 3. In a large bowl, beat the butter and sugar together until light and flu"
}
],
"model": "claude-3-haiku-20240307",
"stop_reason": "max_tokens",
"stop_sequence": null,
"usage": {
"input_tokens": 20,
"output_tokens": 200
},
"messages": [
{
"role": "user",
"content": "How can I make cupcakes"
},
{
"role": "assistant",
"content": "Here is a basic recipe and instructions for making homemade cupcakes: Ingredients: - 1 3/4 cups all-purpose flour - 1 1/2 teaspoons baking powder - 1/4 teaspoon salt - 1/2 cup unsalted butter, at room temperature - 1 cup granulated sugar - 2 large eggs, at room temperature - 1 teaspoon vanilla extract - 1/2 cup milk, at room temperature Instructions: 1. Preheat the oven to 350°F (177°C). Line a 12-cup muffin tin with paper liners. 2. In a medium bowl, whisk together the flour, baking powder, and salt. Set aside. 3. In a large bowl, beat the butter and sugar together until light and flu"
}
]
}

Note: System field “OpenAI” is used for controlling the chat history of Claude actions as well as OpenAI’s actions.

Clear Remembered Chat History

This action is used to clear the “OpenAI” system field JSON. The usecase is to keep the history in control and monitor the execution time of requests to avoid server timeouts and over consumption of tokens.

Remember, More Information to Process = Over consumption of tokens

Vision - Image to Text

This action is used to generate text from an image input. The use case is that an image is provided by the user to Claude and based on the prompt it is analyzed and a result is generated.

Payload

{
"id": "msg_01RFaDsXtJ9DCkMxkebTBBSs",
"type": "message",
"role": "assistant",
"content": [
{
"type": "text",
"text": "The image shows a close-up view of a sunflower against a bright blue sky background. The sunflower has vibrant yellow petals radiating outwards from a large central disk floret. The disk floret appears greenish-yellow and has a subtle texture. The sunflower stem and leaves are visible at the bottom of the frame, adding some green contrast to the predominantly yellow flower. The petals look fresh and the flower seems to be in full bloom, capturing the iconic and cheerful appearance of a sunflower."
}
],
"model": "claude-3-opus-20240229",
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 159,
"output_tokens": 114
}
}

Last updated