This commit is contained in:
Timothy J. Baek 2024-05-20 10:10:35 -07:00
parent 322db31dc9
commit 54677a3374
2 changed files with 12 additions and 8 deletions

View File

@ -344,10 +344,11 @@
$settings.system || (responseMessage?.userContext ?? null) $settings.system || (responseMessage?.userContext ?? null)
? { ? {
role: 'system', role: 'system',
content: content: `${$settings?.system ?? ''}${
$settings.system + responseMessage?.userContext ?? null responseMessage?.userContext ?? null
? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}` ? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}`
: '' : ''
}`
} }
: undefined, : undefined,
...messages ...messages
@ -603,10 +604,11 @@
$settings.system || (responseMessage?.userContext ?? null) $settings.system || (responseMessage?.userContext ?? null)
? { ? {
role: 'system', role: 'system',
content: content: `${$settings?.system ?? ''}${
$settings.system + (responseMessage?.userContext ?? null) responseMessage?.userContext ?? null
? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}` ? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}`
: '' : ''
}`
} }
: undefined, : undefined,
...messages ...messages

View File

@ -350,10 +350,11 @@
$settings.system || (responseMessage?.userContext ?? null) $settings.system || (responseMessage?.userContext ?? null)
? { ? {
role: 'system', role: 'system',
content: content: `${$settings?.system ?? ''}${
$settings.system + responseMessage?.userContext ?? null responseMessage?.userContext ?? null
? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}` ? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}`
: '' : ''
}`
} }
: undefined, : undefined,
...messages ...messages
@ -609,10 +610,11 @@
$settings.system || (responseMessage?.userContext ?? null) $settings.system || (responseMessage?.userContext ?? null)
? { ? {
role: 'system', role: 'system',
content: content: `${$settings?.system ?? ''}${
$settings.system + (responseMessage?.userContext ?? null) responseMessage?.userContext ?? null
? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}` ? `\n\nUser Context:\n${(responseMessage?.userContext ?? []).join('\n')}`
: '' : ''
}`
} }
: undefined, : undefined,
...messages ...messages