Claude AI
OneChat ahora permite a sus usuarios conectarse de forma nativa con la plataforma Claude AI y aprovechar las capacidades de la tecnología de IA de vanguardia dentro de sus chatbots.
Obtener la API Key de Claude
Para obtener la API Key, inicia sesión en https://console.anthropic.com
Una vez dentro, haz clic en **Settings** en el menú superior.
Luego, haz clic en la pestaña **Keys** en el menú izquierdo y crea una API Key.
Integración con OneChat
En el dashboard de tu espacio de trabajo de OneChat, haz clic en **Integrations** y luego en **Claude AI** dentro de la pestaña **Aritficial Intelligence**.
Ingresa la API Key que obtuviste de tu cuenta de Claude y haz clic en **Save**. Ahora deberías ver una marca de verificación que indica que la integración se completó correctamente.
Uso de Claude dentro de Flow Builder
Puedes usar Claude dentro de Flow Builder mediante el nodo de acción. Crea un nodo de acción y selecciona la opción **Integrations**. En el menú que aparece, haz clic en **Claude**.
Acciones de Claude AI
OneChat se integra de forma nativa con los siguientes endpoints ofrecidos por Claude/Anthropic:
Create Chat Completion
Esta acción se utiliza para crear una generación de chat/texto usando el contexto y la información proporcionados.
#### 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"
}
]
} |
Nota: El campo de sistema "OpenAI" se usa para controlar el historial de chat de las acciones de Claude, así como el de las acciones de OpenAI.
Clear Remembered Chat History
Esta acción se utiliza para limpiar el JSON del campo de sistema "OpenAI". El caso de uso es mantener el historial bajo control y monitorear el tiempo de ejecución de las solicitudes para evitar tiempos de espera del servidor y el consumo excesivo de tokens.
Recuerda: Más información para procesar = consumo excesivo de tokens
Vision - Image to Text
Esta acción se utiliza para generar texto a partir de una imagen de entrada. El caso de uso es que el usuario proporciona una imagen a Claude y, con base en el prompt, esta se analiza y se genera un resultado.
#### 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
}
} |
Tutorial en video
TODO_VIDEO[2513c5340d]: reemplazar este video con un recurso oficial de OneChat.
IlB7F5nbpQ