Skip to content
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

feat: Add Slider to Set Temperature #432

Merged
merged 2 commits into from
Aug 21, 2023
Merged

feat: Add Slider to Set Temperature #432

merged 2 commits into from
Aug 21, 2023

Conversation

iRedScarf
Copy link
Contributor

@iRedScarf iRedScarf commented Aug 14, 2023

Description

Added a slider in System Role Settings to set the temperature value.

Linked Issues

#87

Additional context

  1. Ported the slider bar component from V2 version (anse).
  2. The temperature value set through the slider is passed to src/components/Generator.tsx, and then transmitted to src/pages/api/generate.ts and src/utils/openAI.ts via POST.

Below are the screenshots of the temperature value setting interface.

截屏2023-08-15 03 01 59

And the response effect of GPT-4-0314 when the temperature value is set to 2. As can be seen, the reply text has become completely unbridled, consistent with the GPT's thought process when the temperature value is set to 2.

截屏2023-08-15 02 59 58

1. Ported the slider bar component from V2 version (anse).
2. The temperature value set through the slider is passed to src/components/Generator.tsx, and then transmitted to src/pages/api/generate.ts and src/utils/openAI.ts via POST.
@vercel
Copy link

vercel bot commented Aug 14, 2023

@iRedScarf is attempting to deploy a commit to the ddiu8081's Team Team on Vercel.

A member of the Team first needs to authorize it.

@iRedScarf
Copy link
Contributor Author

Even though this version seems to have been discontinued for quite some time, there are still quite a few people who prefer to use this version.

e.g. I deployed it for my wife, ready to use right out of the box.

So I think adding the temperature setting feature is also a nice gesture.

BTW, my implementation might not be very elegant, but it's not like it doesn't work, right? Haha.

@iRedScarf iRedScarf changed the title feat. Add Slider to Set Temperature feat: Add Slider to Set Temperature Aug 14, 2023
@vercel
Copy link

vercel bot commented Aug 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
chatgpt-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 21, 2023 4:09pm

@ddiu8081
Copy link
Member

Thank you!

@ddiu8081 ddiu8081 merged commit 459c6ba into anse-app:main Aug 21, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants