Move System Prompt into ChatInput

Created on 14 July 2025, about 1 month ago

Problem/Motivation

The current architecture for system prompts is a little bit confusing. Because we thought of LLM as AI at the beginning, the system prompt is part of the AiProviderclientBase abstract for all providers, rather then being part of the ChatInput where it belongs.

There exists a setChatSystemRole and getChatSystemRole on the base class that should stay there until 2.0.0, but we can already start moving it to ChatInput, to make logging and event handling easier.

The providers will have too look at both places until 2.0.0.

Also it is refered to as system prompt, not system role anymore.

Proposed resolution

Add a getSystemPrompt and setSystemPrompt to the ChatInput.
Add a variable that keeps it in memory.
Since we have the ProviderProxy reflection class, we can there move the global system prompt if someone set it, into the ChatInput.
Change all submodules to set and get the system prompt from the ChatInput.

✨ Feature request
Status

Active

Version

1.2

Component

AI Core module

Created by

πŸ‡©πŸ‡ͺGermany marcus_johansson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024