You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
May I ask where can I modify the default "sendMessage"? For example, the original "sendMessage" is "systemMessage: You are ChatGPT, xxxxxxxxxx", and I hope to modify it to my own preset character instead of adding a system role through the page.
Suggested solution
If possible, perhaps we can add such a code?
const response = await api.sendMessage(message, { ...options, systemMessage: You are ChatGPT, xxxxxxxxxx, onProgress: (partialResponse) => { process?.(partialResponse) }, })
This project does not depend on the library chatgpt-api, but calls the API directly via HTTP. The system info is passed in the following format:
[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Who won the world series in 2020?"},
{"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},
{"role": "user", "content": "Where was it played?"}
]
Clear and concise description of the problem
May I ask where can I modify the default "sendMessage"? For example, the original "sendMessage" is "systemMessage: You are ChatGPT, xxxxxxxxxx", and I hope to modify it to my own preset character instead of adding a system role through the page.
Suggested solution
If possible, perhaps we can add such a code?
const response = await api.sendMessage(message, { ...options, systemMessage:
You are ChatGPT, xxxxxxxxxx, onProgress: (partialResponse) => { process?.(partialResponse) }, })
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: