-
Notifications
You must be signed in to change notification settings - Fork 380
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
frontend: added temperature gauge to assistant form #901
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #901 +/- ##
==========================================
- Coverage 77.84% 77.81% -0.03%
==========================================
Files 259 259
Lines 11177 11181 +4
==========================================
Hits 8701 8701
- Misses 2476 2480 +4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR, Eric! Just one small nit, and it’s ready to go.
src/interfaces/assistants_web/src/components/AgentSettingsForm/ConfigStep.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems the backend already had a temperature value on Agents.
Did you check that the Agent's updated temperature value gets set in the chat_request, see process_chat()
I think you might need to set it like these lines
# Set the agent settings in the chat request
chat_request.model = agent.model
chat_request.preamble = agent.preamble
Otherwise frontend changes lgtm
The backend uses the temperature passed with the ChatRequest when the chat endpoint is called. I think this is better then defaulting to what is set on the Model because it allows a user to potentially change the temperature between messages. I have the frontend take the value from the model and pass it with the request to the backend. We keep this business logic in the frontend and leave the backend more flexible and scalable. |
@ezawadski I believe the opposite might happen if we don't enforce these values being used by the backend. We could send |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great thank you
Added the Slider Component from the Coral Web interface to the Assistants Web interface.
Added Temperature Setting to Assistant Create and Update forms. This setting is then used when chatting with the assistant.
AI Description
This PR introduces a new
temperature
parameter to theAgentSettingsForm
component and its associated types, allowing users to set the temperature for agents. Thetemperature
parameter is now included in theCreateAgentSettingsFields
andUpdateAgentSettingsFields
types, as well as in theConfigStep
component.temperature
parameter is added to theAgentSettingsForm
component'sConfigStep
component, allowing users to set the temperature for agents.temperature
parameter is included in theCreateAgentSettingsFields
andUpdateAgentSettingsFields
types, ensuring that the temperature is considered when creating or updating agents.temperature
parameter is set to a default value of0.3
in theDEFAULT_AGENT_TEMPERATURE
constant.temperature
parameter is added to theChat.tsx
component, enabling the setting of the temperature for the agent.temperature
parameter is included in theUpdateAgent.tsx
component, allowing the temperature to be updated for the agent.temperature
parameter is added to theCreateAgent.tsx
component, enabling the setting of the temperature for the agent during creation.temperature
parameter is included in theparamsSlice.ts
file, ensuring that the temperature is considered when creating or updating agents.