Skip to content

Modify LLM Configuration



POST /api/v1/llm_cfg/{appid}/modify

Overview

Modify the configuration of a specified LLM application. Supports renaming, changing appId, changing site, modifying extended configuration, and replacing token.

Route Parameters

Parameter Name Type Required Description
appid string Y The appId of the LLM application to be modified.

Body Request Parameters

Parameter Name Type Required Description
newAppId string The new appId. If not provided, the original value is kept. Only letters, numbers, and underscores are supported.
Allow null: False
Allow empty string: True
$maxCharacterLength: 128
jsonContent json JSON format content.
jsonContent.name string Application name, must be unique within the same workspace.
Allow null: False
Max length: 256
jsonContent.type string Application type. Currently only Langfuse is supported.
Allow null: False
Allowed values: ['Langfuse']
jsonContent.site string Site address.
Allow null: False
jsonContent.extend json Other extended settings, stored as-is in jsonContent.extend.
Allow null: False
clientToken string The new clientToken. If not provided, the original token is kept.
Allow null: False
Allow empty string: True

Parameter Supplementary Notes

Interface Description

Modify the LLM application corresponding to the specified appid.

Modification Rules

  1. newAppId is optional. If not provided, the original appId is kept.
  2. jsonContent is partially updated.
  3. clientToken is optional. If not provided, the original token is kept.
  4. If newAppId is provided, only letters, numbers, and underscores are supported.

Currently supported updatable fields in jsonContent are as follows:

Field Description
name Application name
type Application type
site Site address
extend Extended configuration

Response Description

  1. Returns the complete modified object upon success.
  2. clientToken returns the actual token string.
  3. If no new token is provided, the clientToken in the return value remains the original token.

Typical Scenarios

  1. Adjust display name.
  2. Change the connected site address.
  3. Rotate client token.
  4. Standardize appId.

Error Semantics

  1. ft.InvalidLlmAppuuid: The original appid does not exist.
  2. ft.InvalidLlmAppId: newAppId contains illegal characters.
  3. ft.SignNameRepeat: newAppId duplicates another application.
  4. ft.LlmCfgNameRepeat: New name duplicates another.

Request Example

curl 'https://openapi.truewatch.com/api/v1/llm_cfg/llm_app_demo/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json;charset=UTF-8' \
  --data-raw '{"newAppId":"llm_app_demo_v2","jsonContent":{"name":"Langfuse Prod V2","site":"https://cloud.langfuse.com"}}' \
  --compressed

Response

{
    "code": 200,
    "content": {
        "appId": "llm_app_demo_v2",
        "createAt": 1690813059,
        "creator": "acnt_xxxx32",
        "deleteAt": -1,
        "id": 1,
        "jsonContent": {
            "name": "Langfuse Prod V2",
            "type": "Langfuse",
            "site": "https://cloud.langfuse.com",
            "extend": {
                "service": "prod"
            }
        },
        "status": 0,
        "updateAt": 1690813174.8154745,
        "updator": "acnt_xxxx32",
        "uuid": "llm_app_demo_v2",
        "workspaceUUID": "wksp_xxxx32",
        "clientToken": "token_xxx"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-68EEEB4A-9ABC-4DDB-A72B-40F07F2699A5"
}