File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,9 @@ public struct ChatMessage: Equatable, Codable {
145145 /// The references of this message.
146146 @FallbackDecoding < EmptyArray < Reference > >
147147 public var references : [ Reference ]
148+
149+ /// Cache the message in the prompt if possible.
150+ public var cacheIfPossible : Bool
148151
149152 /// Is the message considered empty.
150153 public var isEmpty : Bool {
@@ -164,7 +167,8 @@ public struct ChatMessage: Equatable, Codable {
164167 toolCalls: [ ToolCall ] ? = nil ,
165168 summary: String ? = nil ,
166169 tokenCount: Int ? = nil ,
167- references: [ Reference ] = [ ]
170+ references: [ Reference ] = [ ] ,
171+ cacheIfPossible: Bool = false
168172 ) {
169173 self . role = role
170174 self . senderId = senderId
@@ -176,6 +180,7 @@ public struct ChatMessage: Equatable, Codable {
176180 self . id = id
177181 tokensCount = tokenCount
178182 self . references = references
183+ self . cacheIfPossible = cacheIfPossible
179184 }
180185}
181186
You can’t perform that action at this time.
0 commit comments