[goose-llm] system prompt override (#2791)

This commit is contained in:
Salman Mohammed
2025-06-05 12:51:51 -04:00
committed by GitHub
parent c04373fdb2
commit 0bcea3d130
8 changed files with 132 additions and 14 deletions
+28 -2
View File
@@ -130,8 +130,8 @@ fun main() = runBlocking {
providerConfig,
modelConfig,
systemPreamble,
msgs,
extensions
messages = msgs,
extensions = extensions
)
val response = completion(req)
@@ -140,6 +140,32 @@ fun main() = runBlocking {
// ---- UI Extraction (custom schema) ----
runUiExtraction(providerName, providerConfig)
// --- Prompt Override ---
val prompt_req = createCompletionRequest(
providerName,
providerConfig,
modelConfig,
systemPreamble = null,
systemPromptOverride = "You are a bot named Tile Creator. Your task is to create a tile based on the user's input.",
messages=listOf(
Message(
role = Role.USER,
created = now,
content = listOf(
MessageContent.Text(
TextContent("What's your name?")
)
)
)
),
extensions=emptyList()
)
val prompt_resp = completion(prompt_req)
println("\nPrompt Override Response:\n${prompt_resp.message}")
}