Skip to content

Commit 3ac8dca

Browse files
committed
Raise max chat conversation count to 5
1 parent b5c765a commit 3ac8dca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Core/Sources/OpenAIService/ChatGPTService.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ extension ChatGPTService {
188188
}
189189

190190
func combineHistoryWithSystemPrompt() -> [CompletionRequestBody.Message] {
191-
if history.count > 4 {
191+
if history.count > 5 {
192192
return [.init(role: .system, content: systemPrompt)] +
193-
history[history.endIndex - 4..<history.endIndex].map {
193+
history[history.endIndex - 5..<history.endIndex].map {
194194
.init(role: $0.role, content: $0.content)
195195
}
196196
}

0 commit comments

Comments
 (0)