Skip to content

Commit 52fe8af

Browse files
committed
Merge branch 'hotfix/random-message-id-in-one-llm-round' into hotfix/0.27.1
2 parents 33f4b04 + ca98d1b commit 52fe8af

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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)