cofacts / rumors-api

GraphQL API server for clients like rumors-site and rumors-line-bot
https://api.cofacts.tw
MIT License
109 stars 26 forks source link

[genAIReply] Remove extra args that causes 400 when sending to OpenAI #302

Closed MrOrz closed 1 year ago

MrOrz commented 1 year ago

Avoid sending extra args to OpenAI, which causes 400 error. Note that if temperature is not given, undefined is used, and OpenAI will interprete that as default value (1) rather than 0.

coveralls commented 1 year ago

Coverage Status

Coverage: 88.376% (-0.08%) from 88.454% when pulling 3ec99c24c2e3644a59db433513ed3ec016d08b96 on fix-gen-ai-reply into 96036809223938163e8df4fbab40b39c08a40dc1 on master.