Add a role "system" to the chatgpt query

Created on 8 September 2024, 5 months ago

Problem/Motivation

Sometimes the translator via ChatGPT does not translate correctly (temperature is set to 0). I am using gpt-4o-mini.

Errors can occur, for instance, when the content is in German and the title is already in English; during translation to English, the title might unnecessarily include the text '... is already in English. If you're looking for a translation into another language or need more context, please provide additional details!' I've also noticed occasional issues with the HTML code, among others.

As a solution, I've noticed that we don't pass any system/assistant instructions to ChatGPT. Maybe it would be useful to have a text field in the configuration where these instructions could be stored as needed.

Steps to reproduce

1. Translate a content from "de" to "en" where the title is already in english
2. the title will be extended with aditional infos from the chatgpt

Proposed resolution

For my website, I currently use this specific settings (but I patch directly on the src/GPTApiService.php).

Feature request
Status

Active

Version

2.1

Component

Code

Created by

🇨🇭Switzerland snsblvd

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

Comments & Activities

Production build 0.71.5 2024