Skip to main content
Retrieves detailed information about AI responses including the System Prompt, Conversation history, Knowledge base, website, FAQ chunks, and Rich Text chunks.
GET https://services.leadconnectorhq.com/conversation-ai/generations

Autorización

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.

Query parameters

messageId
string
default:"messageId123"
required
Message Id
source
string
default:"conversation"
required

Respuestas

prompt
string
required
The complete prompt used for the AI response.
intent
string
The intent/goal extracted from account prompt.
responseMessage
string
required
The response message generated by the AI.
faqs
object[]
FAQ chunks used in generating the response from fine-tuned data.
website
object[]
Website content chunks used in generating the response.
agentId
string
default:"emp_123"
ID of the employee/agent that generated the response.
input
string
default:"What is your return policy?"
The original input message that triggered this response.
actionLogs
object[]
required
List of actions taken during this interaction.
history
object[]
required
Conversation history leading up to this response.
mode
string
default:"auto-pilot"
Mode of operation during this interaction.
{
  "prompt": "Personality:\nFriendly and professional,\n\nIntent:\nAssist customers with inquiries\n\nAdditional Information:\nHandle basic support queries",
  "intent": "Assist customers with product inquiries and support",
  "responseMessage": "Hello! I understand you're interested in our products. How can I assist you today?",
  "faqs": [
    {
      "id": "chunk_123",
      "content": "Our return policy allows returns within 30 days of purchase.",
      "title": "Return Policy FAQ"
    }
  ],
  "website": [
    {
      "id": "chunk_456",
      "content": "We offer free shipping on orders over $50.",
      "url": "https://example.com/shipping"
    }
  ],
  "agentId": "emp_123",
  "input": "What is your return policy?",
  "actionLogs": [
    {
      "contactUpdateAction": [
        {
          "fieldId": "field_123",
          "value": "John Doe"
        }
      ]
    }
  ],
  "history": [
    {
      "role": "user",
      "content": "Hi, I have a question about returns"
    },
    {
      "role": "assistant",
      "content": "I'll be happy to help you with information about our return policy."
    }
  // truncado: 3 lineas mas
}
{}
{}
{}

Ejemplo

curl -X GET 'https://services.leadconnectorhq.com/conversation-ai/generations' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/generations', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
    Version: '2021-07-28',
  },
});
const data = await response.json();
import os, requests
response = requests.request(
    'GET',
    'https://services.leadconnectorhq.com/conversation-ai/generations',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
    },
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/conversation-ai/generations');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
        'Version: 2021-07-28',
    ],
]);
$data = json_decode(curl_exec($ch), true);