Skip to content

通话记录大模型质检记录

接口信息

  • 接口: /agent-api/user/{user_id}/task/{task_id}/record/{record_id}/llm_intention_tag
  • 请求方式: GET

路由参数

参数类型示例解释是否必填
user_idstringe5963cd8-ca12-4fe7-bc69-b72853d9867e用户 id(主账号)
task_idstring24fbaa97-6700-481d-b8ca-e8a2b8930fa6任务 id
record_idstringf5cec17f-70f5-42eb-908c-ee1445889733通话记录 id

请求参数

请求示例

cURL
curl -X GET "https://ai.api.longlonglong.cn/agent-api/user/e5963cd8-ca12-4fe7-bc69-b72853d9867e/task/24fbaa97-6700-481d-b8ca-e8a2b8930fa6/record/f5cec17f-70f5-42eb-908c-ee1445889733/llm_intention_tag" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
Go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    client := &http.Client{}
    req, err := http.NewRequest("GET", "https://ai.api.longlonglong.cn/agent-api/user/e5963cd8-ca12-4fe7-bc69-b72853d9867e/task/24fbaa97-6700-481d-b8ca-e8a2b8930fa6/record/f5cec17f-70f5-42eb-908c-ee1445889733/llm_intention_tag", nil)
    if err != nil {
        panic(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("Authorization", "Bearer YOUR_TOKEN")

    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
JavaScript
const axios = require('axios');

const response = await axios.get(
  'https://ai.api.longlonglong.cn/agent-api/user/e5963cd8-ca12-4fe7-bc69-b72853d9867e/task/24fbaa97-6700-481d-b8ca-e8a2b8930fa6/record/f5cec17f-70f5-42eb-908c-ee1445889733/llm_intention_tag',
  {
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_TOKEN'
    }
  }
);

console.log(response.data);
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://ai.api.longlonglong.cn/agent-api/user/e5963cd8-ca12-4fe7-bc69-b72853d9867e/task/24fbaa97-6700-481d-b8ca-e8a2b8930fa6/record/f5cec17f-70f5-42eb-908c-ee1445889733/llm_intention_tag"))
            .header("Content-Type", "application/json")
            .header("Authorization", "Bearer YOUR_TOKEN")
            .GET()
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://ai.api.longlonglong.cn/agent-api/user/e5963cd8-ca12-4fe7-bc69-b72853d9867e/task/24fbaa97-6700-481d-b8ca-e8a2b8930fa6/record/f5cec17f-70f5-42eb-908c-ee1445889733/llm_intention_tag',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: Bearer YOUR_TOKEN'
    ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
Python
import requests

url = 'https://ai.api.longlonglong.cn/agent-api/user/e5963cd8-ca12-4fe7-bc69-b72853d9867e/task/24fbaa97-6700-481d-b8ca-e8a2b8930fa6/record/f5cec17f-70f5-42eb-908c-ee1445889733/llm_intention_tag'
headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_TOKEN'
}

response = requests.get(url, headers=headers)
print(response.json())
C++
#include <iostream>
#include <curl/curl.h>

size_t WriteCallback(void* contents, size_t size, size_t nmemb, void* userp) {
    ((std::string*)userp)->append((char*)contents, size * nmemb);
    return size * nmemb;
}

int main() {
    CURL* curl;
    CURLcode res;
    std::string readBuffer;

    curl = curl_easy_init();
    if(curl) {
        struct curl_slist* headers = NULL;
        headers = curl_slist_append(headers, "Content-Type: application/json");
        headers = curl_slist_append(headers, "Authorization: Bearer YOUR_TOKEN");

        curl_easy_setopt(curl, CURLOPT_URL, "https://ai.api.longlonglong.cn/agent-api/user/e5963cd8-ca12-4fe7-bc69-b72853d9867e/task/24fbaa97-6700-481d-b8ca-e8a2b8930fa6/record/f5cec17f-70f5-42eb-908c-ee1445889733/llm_intention_tag");
        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);

        res = curl_easy_perform(curl);
        if(res != CURLE_OK)
            fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
        else
            std::cout << readBuffer << std::endl;

        curl_easy_cleanup(curl);
    }
    return 0;
}

返回结果

json
{
    "code": 200,
    "status": "success",
    "message": "查看大模型质检数据成功",
    "data": {
        "intention_results": 2,
        "display": "意向标签修改原因: 意向等级:B,原因:客户表达了对健康顾问的兴趣,但未明确表达对产品本身的兴趣。,标签:[健康顾问,兴趣],输出字段:"
    }
}

字段说明

字段说明
intention_results意向标签等级(大模型质检之后的结果,未质检值为0)
display意向标签等级匹配规则(大模型总结)

基于 MIT 许可发布