Skip to content

Commit ca98d1b

Browse files
committed
Ignore chunk id
1 parent 33f4b04 commit ca98d1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tool/Sources/OpenAIService/ChatGPTService.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ extension ChatGPTService {
274274
do {
275275
let (trunks, cancel) = try await api()
276276
cancelTask = cancel
277-
let proposedId = UUID().uuidString
277+
let proposedId = UUID().uuidString + String(Date().timeIntervalSince1970)
278278
for try await trunk in trunks {
279279
guard let delta = trunk.choices?.first?.delta else { continue }
280280

@@ -290,7 +290,7 @@ extension ChatGPTService {
290290
}
291291

292292
await memory.streamMessage(
293-
id: trunk.id ?? proposedId,
293+
id: proposedId,
294294
role: delta.role,
295295
content: delta.content,
296296
functionCall: functionCall

0 commit comments

Comments
 (0)