Skip to content

Commit cb95060

Browse files
committed
Fix history resolving
1 parent f8f5a49 commit cb95060

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Tool/Sources/OpenAIService/Memory/TemplateChatGPTMemory.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public actor TemplateChatGPTMemory: ChatGPTMemory {
3333

3434
var memoryTemplate = self.memoryTemplate
3535
func checkTokenCount() async -> Bool {
36-
let history = self.history
36+
let history = memoryTemplate.resolved()
3737
var tokenCount = 0
3838
for message in history {
3939
tokenCount += await strategy.countToken(message)

0 commit comments

Comments
 (0)