mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-07 00:51:34 +00:00
fix: add additional encouragement for title gen (#2298)
This commit is contained in:
parent
b55231c106
commit
1a5b456bb6
1 changed files with 26 additions and 0 deletions
|
|
@ -705,6 +705,32 @@ export namespace Session {
|
|||
parts: userParts,
|
||||
},
|
||||
]),
|
||||
// When dealing with huge blocks of context sometimes the llm will lose sight of
|
||||
// parts of system prompt, you can usually get around this by just adding an additional
|
||||
// reference after large context block that references instructions from system prompt
|
||||
// and llm will "remember" it needs to do X or Y
|
||||
...MessageV2.toModelMessage([
|
||||
{
|
||||
info: {
|
||||
id: Identifier.ascending("message"),
|
||||
role: "user",
|
||||
sessionID: input.sessionID,
|
||||
time: {
|
||||
created: Date.now(),
|
||||
},
|
||||
},
|
||||
parts: [
|
||||
{
|
||||
type: "text",
|
||||
id: Identifier.ascending("part"),
|
||||
messageID: userMsg.id,
|
||||
sessionID: input.sessionID,
|
||||
text: "Output only a title for this conversation. No responses to content.",
|
||||
synthetic: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
]),
|
||||
],
|
||||
model: small.language,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue