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¶
newAppIdis optional. If not provided, the originalappIdis kept.jsonContentis partially updated.clientTokenis optional. If not provided, the original token is kept.- If
newAppIdis 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¶
- Returns the complete modified object upon success.
clientTokenreturns the actual token string.- If no new token is provided, the
clientTokenin the return value remains the original token.
Typical Scenarios¶
- Adjust display name.
- Change the connected site address.
- Rotate client token.
- Standardize appId.
Error Semantics¶
ft.InvalidLlmAppuuid: The originalappiddoes not exist.ft.InvalidLlmAppId:newAppIdcontains illegal characters.ft.SignNameRepeat:newAppIdduplicates another application.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"
}