perf(anthropic): prompt-caching (#517)

bring back prompt caching support on Anthropic

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham
2024-09-04 03:19:33 -04:00
committed by GitHub
parent c027ea269a
commit 2b89f0d529
12 changed files with 116 additions and 75 deletions

View File

@@ -110,9 +110,13 @@ N.get_file = function(mode)
return string.format("%s.avanterules", mode)
end
---@param path string
---@param opts TemplateOptions
N.render_file = function(path, opts) return templates.render(path, opts) end
---@param mode LlmMode
---@param opts TemplateOptions
N.render = function(mode, opts) return templates.render(N.get_file(mode), opts) end
N.render_mode = function(mode, opts) return templates.render(N.get_file(mode), opts) end
N.initialize = function(directory) templates.initialize(directory) end