mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-02 08:38:51 +01:00
feat: artifacts system prompt in backend
This commit is contained in:
parent
fa0032d91d
commit
e3bcfc560d
11 changed files with 225 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
|||
const { removeNullishValues } = require('librechat-data-provider');
|
||||
const artifactsPrompt = require('~/app/clients/prompts/artifacts');
|
||||
|
||||
const buildOptions = (endpoint, parsedBody) => {
|
||||
const {
|
||||
|
|
@ -10,8 +11,10 @@ const buildOptions = (endpoint, parsedBody) => {
|
|||
iconURL,
|
||||
greeting,
|
||||
spec,
|
||||
artifacts,
|
||||
...modelOptions
|
||||
} = parsedBody;
|
||||
|
||||
const endpointOption = removeNullishValues({
|
||||
endpoint,
|
||||
chatGptLabel,
|
||||
|
|
@ -25,6 +28,10 @@ const buildOptions = (endpoint, parsedBody) => {
|
|||
modelOptions,
|
||||
});
|
||||
|
||||
if (artifacts === 'default') {
|
||||
endpointOption.promptPrefix = `${promptPrefix ?? ''}\n${artifactsPrompt}`.trim();
|
||||
}
|
||||
|
||||
return endpointOption;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue