Repository navigation
Adding sytem message prompt on certain conditions to chat #5
Closed
arvindsaraf
started this conversation in
General
Replies: 3 comments
|
Nice idea @arvindsaraf 💡 We can probably add an API to enable send/changing the system message .. The system message is basically like a normal user message .. that also gets sent to ChatGPT, but doesn't get displayed to the user .. and ChatGPT does not response to it. We can have something like: That can be called whenever it's needed. Feature request added to backlog! ✔️ |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am using ReactAI AIChat component - and want to periodically add system prompt to the frontend chat, eg something like below:
`useEffect(() => {
const interval = setInterval(() => {
console.log("Chat Timer event triggered....")
// Simulate an API call to fetch text
const confusingContent = "Newton's 3rd law";
The above doesn't work - since the
systemMessageparam does not exist. What is best way to add this prompt to a live session? Is there a field -egsystemMessagethat the component can be made to listen to? Or any other way?Thanks
All reactions