mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
fix(executor): add logging and prompt cache key handling for OpenAI responses
This commit is contained in:
@@ -508,6 +508,11 @@ func (e *CodexExecutor) cacheHelper(ctx context.Context, from sdktranslator.Form
|
|||||||
codexCacheMap[key] = cache
|
codexCacheMap[key] = cache
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if from == "openai-response" {
|
||||||
|
promptCacheKey := gjson.GetBytes(req.Payload, "prompt_cache_key")
|
||||||
|
if promptCacheKey.Exists() {
|
||||||
|
cache.ID = promptCacheKey.String()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rawJSON, _ = sjson.SetBytes(rawJSON, "prompt_cache_key", cache.ID)
|
rawJSON, _ = sjson.SetBytes(rawJSON, "prompt_cache_key", cache.ID)
|
||||||
|
|||||||
Reference in New Issue
Block a user