Skip to content

Commit 77e9379

Browse files
committed
feat: add global.base.output
1 parent 5f24386 commit 77e9379

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

core/components/modai/src/Processors/Prompt/FreeText.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ public function process()
2525
$temperature = (float)Settings::getSetting($this->modx, 'global.temperature', $model);
2626
$maxTokens = (int)Settings::getSetting($this->modx, 'global.max_tokens', $model);
2727

28+
$output = Settings::getSetting($this->modx, 'global.base.output');
29+
if (!empty($output)) {
30+
$messages[] = [
31+
'role' => 'system',
32+
'content' => $output,
33+
];
34+
}
35+
2836
$base = Settings::getPrompt($this->modx, 'global.base');
2937
if (!empty($base)) {
3038
$messages[] = [

core/components/modai/src/Processors/Prompt/Text.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ public function process()
5959
return $this->failure($e->getMessage());
6060
}
6161

62+
$output = Settings::getSetting($this->modx, 'global.base.output');
63+
if (!empty($output)) {
64+
$messages[] = [
65+
'role' => 'system',
66+
'content' => $output,
67+
];
68+
}
69+
6270
$base = Settings::getPrompt($this->modx, 'global.base');
6371
if (!empty($base)) {
6472
$messages[] = [

0 commit comments

Comments
 (0)