xqdoo00o / chatgpt-web

Pure Javascript ChatGPT demo based on OpenAI API
https://xqdoo00o.github.io/chatgpt-web/
MIT License
983 stars 369 forks source link

Question about Default System Role #90

Closed yojner closed 1 year ago

yojner commented 1 year ago

Hi, since System Prompt for Default, is set to blank. Is there a way to add your own default system prompt that automatically sets as the default prompt? If yes, which line should I change?

xqdoo00o commented 1 year ago

Just add your prompt as value= at line 2332. then you could see that prompt as default system role on top-right quick settings.

yojner commented 1 year ago

hi, this is line 2332 on your index.html, can you show how you do it?, like for example if I want to set "You are a helpful assistant" as my default system prompt, how to set it on this line?

<textarea class="inputTextClass areaTextClass" autocomplete="off"

xqdoo00o commented 1 year ago

add value="You are a helpful assistant"

yojner commented 1 year ago

like this?

<textarea class="inputTextClass areaTextClass" autocomplete="off" value="You are a helpful assistant."

xqdoo00o commented 1 year ago

yes

yojner commented 1 year ago

ok, will try, thank you for your patience.

yojner commented 1 year ago

Hi, did what you recommend above but still doesnt appear. This is the default value i put "You are ChatGPT, a large language model trained by OpenAI. Carefully heed the user's instructions. Respond using markdown."

check SS https://telegra.ph/file/df25f7b46aa8f22132b72.jpg

xqdoo00o commented 1 year ago

My mistake, plz update to the newest version HTML. and add your prompt in line 2333 like below fmt id="systemInput">You are ChatGPT, a large language model trained by OpenAI. Carefully heed the user's instructions. Respond using markdown.</textarea>

yojner commented 1 year ago

My mistake, plz update to the newest version HTML. and add your prompt in line 2333 like below fmt id="systemInput">You are ChatGPT, a large language model trained by OpenAI. Carefully heed the user's instructions. Respond using markdown.</textarea>

thanks for fixing this sir, it now appears in the text area, but I noticed when I switched to other prompt, then switch back to the Default again, the default prompt you've created disappear, is there a way so it would print again?

xqdoo00o commented 1 year ago

OK, just undo the modify in line 2333. and update to the newest version HTML. then add you prompt at line 2924 like below fmt "defaultText": "You are ChatGPT, a large language model trained by OpenAI. Carefully heed the user's instructions. Respond using markdown.", if you want Chinese default prompt add at line 3077

yojner commented 1 year ago

OK, just undo the modify in line 2333. and update to the newest version HTML. then add you prompt at line 2924 like below fmt "defaultText": "You are ChatGPT, a large language model trained by OpenAI. Carefully heed the user's instructions. Respond using markdown.", if you want Chinese default prompt add at line 3077

hi bro, i think you missed some parts of the code when youre doing changes, i re-forked your repo now, and deploy without any changes made yet, it was stuck on the loading screen..

xqdoo00o commented 1 year ago

OK, just undo the modify in line 2333. and update to the newest version HTML. then add you prompt at line 2924 like below fmt "defaultText": "You are ChatGPT, a large language model trained by OpenAI. Carefully heed the user's instructions. Respond using markdown.", if you want Chinese default prompt add at line 3077

hi bro, i think you missed some parts of the code when youre doing changes, i re-forked your repo now, and deploy without any changes made yet, it was stuck on the loading screen..

sry, fixed

yojner commented 1 year ago

thank you so much sir, everything works fine now.. Time to close :) thank you.