New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: fix the temperature value of ollama model #4027
Conversation
Where did you get the range of values from? As far as I know, the temperature parameter for most models ranges from 0 to 2. |
I have seen temperature values of most of the large language model ranges between 0 to 1. but after your feedback i have done some research more. i have found some useful discussion and links. but there are lots of confusion. openai community discussion |
You're right, that's why we set the temperature range in our OpenAI Compatible API provider to 0-2, while OpenAI provider sets it to 0-1. We follow the official OpenAI provider's range, while other providers compatible with OpenAI API have different ranges for temperature, so we adjusted it to 0-2. |
I think we need to set temperature range 0-2 in official open ai provider also. docs of openai |
Oops, my bad, OpenAI updated the range of temperature values, I didn't notice that. |
Sure |
Hello @takatost , Sorry for late response, i have adjusted open ai max temperature to 2. but when i tried and asking some question it generating some wierd responses. when i decrease the temperature below one then it will answer what i want. and for adjusting temperature i follow this simple steps.
Also for testing i update the version of openai but it will not work as expected. do you have any idea? |
Yeah, we tested it too. Once the temperature goes over 1, all sorts of garbled characters start showing up. Just as expected. 😅 And, what issues might occur if updating to the latest version of OpenAI SDK? |
Same issue after updating OpenAI Sdk also. |
Description
set the maximum temperature value of 1 in ollama models.
Fixes # (issue)
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Suggested Checklist:
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint godsoptional
I have made corresponding changes to the documentationoptional
I have added tests that prove my fix is effective or that my feature worksoptional
New and existing unit tests pass locally with my changes