Update system prompt handling (again)
Add `api.ApplySystemPrompt`, renamed `GetSystemPrompt` to `DefaultSystemPrompt`.
This commit is contained in:
@@ -143,12 +143,9 @@ func Chat(shared shared.Shared) Model {
|
||||
m.replyCursor.SetChar(" ")
|
||||
m.replyCursor.Focus()
|
||||
|
||||
system := shared.Ctx.Config.GetSystemPrompt()
|
||||
system := shared.Ctx.DefaultSystemPrompt()
|
||||
if system != "" {
|
||||
m.messages = []api.Message{{
|
||||
Role: api.MessageRoleSystem,
|
||||
Content: system,
|
||||
}}
|
||||
m.messages = api.ApplySystemPrompt(m.messages, system, false)
|
||||
}
|
||||
|
||||
m.input.Focus()
|
||||
|
||||
Reference in New Issue
Block a user