We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31f5587 commit 9ffa597Copy full SHA for 9ffa597
anthropic-client/src/main/scala/io/cequence/openaiscala/anthropic/service/impl/package.scala
@@ -48,7 +48,8 @@ package object impl extends AnthropicServiceConsts {
48
messages.zipWithIndex.collect { case (SystemMessage(content, _), index) =>
49
useSystemCache match {
50
case Some(cacheControl) =>
51
- if (index == 0) ContentBlockBase(TextBlock(content), Some(cacheControl))
+ if (index == messages.size - 1)
52
+ ContentBlockBase(TextBlock(content), Some(cacheControl))
53
else ContentBlockBase(TextBlock(content), None)
54
case None => ContentBlockBase(TextBlock(content))
55
}
0 commit comments