nhaouari / obsidian-textgenerator-plugin

Text Generator is a versatile plugin for Obsidian that allows you to generate text content using various AI providers, including OpenAI, Anthropic, Google and local models.
https://text-gen.com/
MIT License
1.45k stars 127 forks source link

How to set "System Message" #291

Closed quantarion closed 3 months ago

quantarion commented 4 months ago

I checked everywhere but couldn't find a way to set the "System Message"—the message sent with every prompt. Sometimes it’s referred to as the "System Prompt" or, in the ChatGPT UI, "Customize ChatGPT/Custom Instructions." It would be great to set the System Prompt and define the "character" of the AI assistant. I'm sure it's hidden somewhere among the myriad of options, and I'd greatly appreciate it if someone could point me in the right direction.

Code-WSY commented 3 months ago

In the metadata section of the template, you can set the corresponding fields to configure 'System Message'. Here is the specific content of the document: The -ystem and messages fields in the config file allow you to configure the system's behavior and define messages for various interactions with the LLM. For example, you can configure the system to act as an English translator, spelling corrector, and improver that responds in corrected and improved English. The system field is a string describing the system, and the messages field is an array containing user and assistant messages in alternating order, defining the conversation flow.