Update ChatGPT service to use `gpt-5-nano` model by tj-wazei · Pull Request #1373 · Together-Java/TJ-Bot
Pull-request
- I have read the contributing guidelines.
- I have read the code guidelines.
- I have created a relating issue.
Changes
- Existing code
- New feature
Closes Issue: NaN
Description
Prior to this PR we were using the legacy com.theokanning.openai-gpt3-java:api dependency to interact with ChatGPT which is unmaintained.
OpenAI has published and maintain their own dependency com.openai:openai-java which is now being used.
The AI model being used now in our code is gpt-5-nano because of the following reasons:
- It's much better at reasoning and provides better quality answers to questions
- It's much cheaper than the
gpt-3.5-turbomodel we are currently using.
Pricing difference:
gpt-5-nano: $0.05 / 1m tokens
gpt-3.5-turbo: $0.50 /1m tokens
Source: https://platform.openai.com/docs/pricing?legacy-pricing=standard
Our GPT bill will be 10x less than before and we'll have better quality answers for our users <3
Note: things like TEMPERATURE has been removed as the model does not support this.