mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-05 08:33:10 +00:00
set promptCacheKey for openai compatible providers (#4203)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
@@ -128,10 +128,15 @@ export namespace ProviderTransform {
|
||||
return undefined
|
||||
}
|
||||
|
||||
export function options(providerID: string, modelID: string, sessionID: string): Record<string, any> | undefined {
|
||||
export function options(
|
||||
providerID: string,
|
||||
modelID: string,
|
||||
npm: string,
|
||||
sessionID: string,
|
||||
): Record<string, any> | undefined {
|
||||
const result: Record<string, any> = {}
|
||||
|
||||
if (providerID === "openai") {
|
||||
if (providerID === "openai" || npm.includes("openai")) {
|
||||
result["promptCacheKey"] = sessionID
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user