Skip to content

Commit aebdaca

Browse files
committed
Adjust chatgpt tab title
1 parent 47464b9 commit aebdaca

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Core/Sources/ChatTab/ChatGPT/ChatProvider.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public final class ChatProvider: ObservableObject {
1818
.text else { return defaultTitle }
1919
if lastMessageText.isEmpty { return defaultTitle }
2020
return lastMessageText
21+
.trimmingCharacters(in: .punctuationCharacters)
22+
.trimmingCharacters(in: .whitespacesAndNewlines)
2123
}
2224

2325
public var extraSystemPrompt = ""

Tool/Sources/LangChain/Agents/ChatAgent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public class ChatAgent: Agent {
102102
(Please continue with `Thought:` or `Final Answer:`)
103103
""")
104104
}
105-
105+
106106
public func validateTools(tools: [AgentTool]) throws {
107107
// no validation
108108
}

0 commit comments

Comments
 (0)