Add claude 1 hour caching
This commit is contained in:
@@ -3077,10 +3077,18 @@ async function requestClaude(arg:RequestDataArgumentExtended):Promise<requestDat
|
|||||||
|
|
||||||
}
|
}
|
||||||
if(chat.cache){
|
if(chat.cache){
|
||||||
|
if(db.claude1HourCaching){
|
||||||
|
formatedChat.content[0].cache_control = {
|
||||||
|
type: 'ephemeral',
|
||||||
|
ttl: "1h"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
formatedChat.content[0].cache_control = {
|
formatedChat.content[0].cache_control = {
|
||||||
type: 'ephemeral'
|
type: 'ephemeral'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
claudeChat.push(formatedChat)
|
claudeChat.push(formatedChat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user