Skip to content

Commit 8ca786f

Browse files
committed
feat: Bumped llama.cpp to release b5174
1 parent bcd26a0 commit 8ca786f

18 files changed

Lines changed: 102 additions & 83 deletions

File tree

Sidekick.xcodeproj/project.pbxproj

Lines changed: 80 additions & 72 deletions
Large diffs are not rendered by default.
Binary file not shown.

Sidekick/Logic/Data Models/Memories.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public class Memories: ObservableObject {
224224
}
225225
// Prompt worker model
226226
let messageText: String = """
227-
The user sent the message below. What personal information / opinion does this reveal about the user?
227+
The user sent the message below. What personal information / opinion does this reveal about the user? Do not extract the information if it is very message specific, such as a specific request.
228228
229229
Respond in the format `The user [verb] [information]`. If there is no personal information / opinion, respond with the word "nil".
230230

Sidekick/Logic/Inference/llama.cpp/Types/ChatParameters.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,16 @@ struct ChatParameters: Codable {
7878
}
7979
// Tell the LLM to use sources
8080
fullSystemPromptComponents.append(InferenceSettings.useSourcesPrompt)
81-
// Tell the LLM to use functions when enabled
81+
// Tell the LLM to use functions when enabled and server does not support native tool calling
8282
if Settings.useFunctions && useFunctions {
8383
fullSystemPromptComponents.append(InferenceSettings.useFunctionsPrompt)
84-
// Inject function schema
85-
let functions: [any AnyFunctionBox] = DefaultFunctions.functions
86-
for function in functions {
87-
fullSystemPromptComponents.append(function.getJsonSchema())
84+
// Inject function schema if no native tool calling
85+
if !InferenceSettings.hasNativeToolCalling {
86+
fullSystemPromptComponents.append(InferenceSettings.functionsSchemaPrompt)
87+
let functions: [any AnyFunctionBox] = DefaultFunctions.functions
88+
for function in functions {
89+
fullSystemPromptComponents.append(function.getJsonSchema())
90+
}
8891
}
8992
}
9093
// Join all components
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
33.7 KB
Binary file not shown.
400 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)