跳转至

列出 LLM 配置



GET /api/v1/llm_cfg/list

概述

列出当前工作空间下的 LLM 应用配置,支持分页、过滤与统计指标聚合

Query 请求参数

参数名 类型 必选 说明
search string 按应用名称模糊搜索
允许为空: False
type string 应用类型,当前仅支持 Langfuse
允许为空: False
可选值: ['Langfuse']
pageIndex int 页码
允许为空: False
$default: 1
pageSize int 每页数量(最大 100)
允许为空: False
$default: 20
timeRange array 统计信息时间范围,毫秒时间戳数组;不传默认最近 24 小时,例如 [1711900800000,1711987200000]
允许为空: False

参数补充说明

接口说明

返回当前工作空间下的 LLM 应用配置列表,支持分页、过滤与统计指标聚合。

quick_list 的区别

  1. 本接口支持分页
  2. 本接口会返回 clientToken
  3. 本接口会返回 ifTokenExpired
  4. 本接口会合并 LLM 调用统计信息

统计信息字段

字段 说明
statisticalInfo.callCount 调用次数
statisticalInfo.errorCount 错误次数
statisticalInfo.tokensCount tokens 总量
statisticalInfo.p50 请求延迟 p50
statisticalInfo.p75 请求延迟 p75

时间范围说明

  1. 可通过 timeRange 指定统计查询时间范围,格式为毫秒时间戳数组 [start, end]
  2. 不传时默认取最近 24 小时
  3. 若统计服务暂时不可用,接口仍会返回配置列表,但统计字段可能为空

过滤规则

  1. searchjsonContent.name 模糊匹配
  2. typejsonContent.type 精确过滤

请求例子

curl 'https://openapi.guance.com/api/v1/llm_cfg/list?pageIndex=1&pageSize=20&type=Langfuse' \
  -H 'Content-Type: application/json' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  --compressed

响应

{
    "code": 200,
    "content": {
        "data": [
            {
                "appId": "llm_app_demo",
                "jsonContent": {
                    "name": "Langfuse Prod",
                    "type": "Langfuse",
                    "site": "https://cloud.langfuse.com",
                    "extend": {
                        "service": "prod"
                    }
                },
                "uuid": "llm_app_demo",
                "workspaceUUID": "wksp_xxxx32",
                "clientToken": "token_xxx",
                "ifTokenExpired": false,
                "statisticalInfo": {
                    "callCount": 12,
                    "errorCount": 0,
                    "tokensCount": 456,
                    "p50": 10,
                    "p75": 15
                }
            }
        ],
        "pageInfo": {
            "count": 1,
            "pageIndex": 1,
            "pageSize": 20,
            "total": 1
        }
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-68EEEB4A-9ABC-4DDB-A72B-40F07F2699A5"
} 

文档评价

文档内容是否对您有帮助? ×