feat: 新增模型扩展映射与查询配置字段

This commit is contained in:
2026-05-23 18:08:08 +08:00
parent 5416e7a983
commit a28fcbaee9
9 changed files with 203 additions and 151 deletions

View File

@@ -262,8 +262,8 @@ func (w *asyncWorker) rollbackToPending(ctx context.Context, id int64) error {
}
// GetExpendTokens 根据映射路径从 textResult 中提取消耗 token 值
func GetExpendTokens(tokenMapping string, textResult string) int {
value := gjson.Get(textResult, tokenMapping)
func GetExpendTokens(responseTokenField string, textResult string) int {
value := gjson.Get(textResult, responseTokenField)
if value.Exists() {
return int(value.Int())
}