Skip to content

Commit abf479a

Browse files
committed
Update definition of ChatAgent
1 parent 970bc84 commit abf479a

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

Tool/Sources/ChatBasic/ChatAgent.swift

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ import Foundation
33
public enum ChatAgentResponse {
44
public enum Content {
55
case text(String)
6-
case modification
76
}
8-
7+
98
/// Post the status of the current message.
109
case status(String)
1110
/// Update the text message to the current message.
12-
case content([Content])
11+
case content(Content)
1312
/// Update the attachments of the current message.
1413
case attachments([URL])
1514
/// Update the references of the current message.
@@ -21,11 +20,18 @@ public enum ChatAgentResponse {
2120
public struct ChatAgentRequest {
2221
public var text: String
2322
public var history: [ChatMessage]
23+
public var references: [ChatMessage.Reference]
2424
public var extraContext: String
2525

26-
public init(text: String, history: [ChatMessage], extraContext: String) {
26+
public init(
27+
text: String,
28+
history: [ChatMessage],
29+
references: [ChatMessage.Reference],
30+
extraContext: String
31+
) {
2732
self.text = text
2833
self.history = history
34+
self.references = references
2935
self.extraContext = extraContext
3036
}
3137
}

0 commit comments

Comments
 (0)