We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5c765a commit 3ac8dcaCopy full SHA for 3ac8dca
Core/Sources/OpenAIService/ChatGPTService.swift
@@ -188,9 +188,9 @@ extension ChatGPTService {
188
}
189
190
func combineHistoryWithSystemPrompt() -> [CompletionRequestBody.Message] {
191
- if history.count > 4 {
+ if history.count > 5 {
192
return [.init(role: .system, content: systemPrompt)] +
193
- history[history.endIndex - 4..<history.endIndex].map {
+ history[history.endIndex - 5..<history.endIndex].map {
194
.init(role: $0.role, content: $0.content)
195
196
0 commit comments