c0sogi / LLMChat

A full-stack Webui implementation of Large Language model, such as ChatGPT or LLaMA.
MIT License
245 stars 40 forks source link

Message prefix/suffix #35

Closed Torhamilton closed 1 year ago

Torhamilton commented 1 year ago

Ability to add prefix/suffix instruction to first message in chat. Best as .env variable. I want to instruct openAI about policies. Kindly give me a pointer so I can attempt this.

Torhamilton commented 1 year ago

I added default message for system-role, but I think prefix/suffix would make my task easier

c0sogi commented 1 year ago

You can add prefixes and suffixes directly in llms.py, but you can also add GLOBAL_PREFIX, GLOBAL_SUFFIX to your .env. Setting the GLOBAL value will override the prefix and suffix set in LLM.

e2d3b92feb0d316e25576dfc9070177f13746806