Prompt Caching: Top-Level cache_control im Request-Body
This commit is contained in:
1 parent
52e9ef7f9e
commit
92072f5064
3 files changed
+14
-33
No files matched your search
@@ -142,11 +142,9 @@ public static class ChatEndpoint
|
||||
}, attachmentRecords);
|
||||
}
|
||||
|
||||
// cache_control markiert den System-Prompt als Cache-Breakpoint.
|
||||
// Anthropic cached alles bis einschließlich dieses Blocks für 5 Minuten → 90% Rabatt auf diese Tokens.
|
||||
var systemPrompt = new List<object>
|
||||
{
|
||||
new { type = "text", text = systemPromptText, cache_control = new { type = "ephemeral" } }
|
||||
new { type = "text", text = systemPromptText }
|
||||
};
|
||||
|
||||
var workspace = session.Workspace;
|
||||
|
||||
Reference in new issue
Block a user