Skip to content

chatOptions.baseSystemMessage option in the json config to being able to override the default system prompt #5254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ferenci84
Copy link
Contributor

@ferenci84 ferenci84 commented Apr 20, 2025

Description

Previously it was impossible to override the default system prompt. Yaml config now has chatOptions.baseSystemMessage that can do that, but not available from json config.

Now added chatOptions.baseSystemMessage config option in the json config similar to the yaml config to being able to override the system message.

Issue: #5256

Checklist

  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Testing instructions

You should be able to override the default system prompt with any of the following model config:

    {
      "title": "Anthropic Claude 3.7 Sonnet",
      "model": "claude-3-7-sonnet-latest",
      "provider": "anthropic",
      "apiKey": "YOUR_API_KEY",
      "systemMessage": "Your own system message",
      "chatOptions": {
        "baseSystemMessage": ""
      },
    {
      "title": "Anthropic Claude 3.7 Sonnet",
      "model": "claude-3-7-sonnet-latest",
      "provider": "anthropic",
      "apiKey": "YOUR_API_KEY",
      "chatOptions": {
        "baseSystemMessage": "Your own system message"
      },

Just setting systemMessage only should keep the legacy behaviour: systemMessage is appended to the default prompt with two newlines.

@ferenci84 ferenci84 requested a review from a team as a code owner April 20, 2025 14:24
@ferenci84 ferenci84 requested review from Patrick-Erichsen and removed request for a team April 20, 2025 14:24
Copy link

netlify bot commented Apr 20, 2025

Deploy Preview for continuedev ready!

Name Link
🔨 Latest commit 4b6a6a7
🔍 Latest deploy log https://app.netlify.com/sites/continuedev/deploys/680503a721f5c60008eb7c13
😎 Deploy Preview https://deploy-preview-5254--continuedev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ferenci84 JSON model systemMessage is already converted to the base chat system message, so this functionality is duplicate. Are you finding that this isn't working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants