matrixgpt / matrix-chatgpt-bot

Talk to ChatGPT via any Matrix client!
GNU Affero General Public License v3.0
233 stars 64 forks source link

Added chatgpt temperature environment variable #162

Closed deetungsten closed 1 year ago

deetungsten commented 1 year ago

Hello,

I looked through the API and noticed that you can set the temperature. I added an environment so you can set the temperature to another value besides the default (0.8)

max298 commented 1 year ago

Thank you very much! I've noticed that the waylaidwanderer/node-chatgpt-api library doesn't know much about the impact of changing the temperature, should we add some sort of documentation for our users?

deetungsten commented 1 year ago

@max298, I think it's fairly known how the temperature effects the performance in a qualitative sense (here's a medium article with a decent explanation). Closer to 0 is more deterministic which is good for technical question. Closer to 1 and above makes it more random and "creative" which makes it better for content generation. The remark in the link you provided is that no one knows what ChatGPT temperature is set at by OpenAI but 0.8 (the default in node-chatgpt-api) is a decent guess, it's fairly standard to be closer to 0.7 for precise answers.

deetungsten commented 1 year ago

@max298 I added some context to the README and .env.example

max298 commented 1 year ago

Thank you so much! I can't wait to play around with this 👍