Skip to content
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

May I ask where can I modify the default "sendMessage"? #388

Closed
3 tasks done
Azad-Aihub opened this issue Apr 27, 2023 · 1 comment
Closed
3 tasks done

May I ask where can I modify the default "sendMessage"? #388

Azad-Aihub opened this issue Apr 27, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Azad-Aihub
Copy link

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

@Azad-Aihub Azad-Aihub added the enhancement New feature or request label Apr 27, 2023
@ddiu8081
Copy link
Member

ddiu8081 commented Apr 27, 2023

Sorry, but I don't quite understand what you mean.

Whether you were talking about this library transitive-bullshit/chatgpt-api?

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?"}
]

@ddiu8081 ddiu8081 closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants