Skip to content

Commit 66435e9

Browse files
committed
Add tools and tool_choice to ChatCompletionRequest
Updated ChatView.swift to include 'tools' and 'tool_choice' parameters in the ChatCompletionRequest initialization. Also added user-specific Xcode workspace and scheme management files.
1 parent b172fc9 commit 66435e9

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

.DS_Store

6 KB
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>Perspective Intelligence.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>

Perspective Intelligence/ChatView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ final class ChatViewModel: ObservableObject {
8585
mapped.append(.init(role: lastUser.role.rawValue, content: lastUser.content))
8686
}
8787
// Fixed model (non-configurable)
88-
let reqBody = ChatCompletionRequest(model: "apple.local", messages: mapped, temperature: temperature, max_tokens: nil, stream: false, multi_segment: nil)
88+
let reqBody = ChatCompletionRequest(model: "apple.local", messages: mapped, temperature: temperature, max_tokens: nil, stream: false, multi_segment: nil, tools: nil, tool_choice: nil)
8989
let url = URL(string: "http://127.0.0.1:\(port)/v1/chat/completions")!
9090
var request = URLRequest(url: url)
9191
request.httpMethod = "POST"

0 commit comments

Comments
 (0)