You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating this enhancement issue as suggested by @lgrammel in this thread -> #2820
Current Scenario: In a conversation, user asks a query & assistant provides an answer. Both the query and response are represented as messages. By default, useChat's handleSubmit method generates the user's message & appends it to messages. There can be no customisation & its fixed.
Requirement: Many a times, user message can have more than a query/text, there could be an extra filters that user has selected. (Check the usecaseProvide a way for the user to add more attributes to the user's message either through a callback or via any other mechanism
Current code:
Use Case
Here's our usecase. We have a stock market based chat assistant. While asking a query, users can select the year/quarter/filing type from the filters & send these filters to the API. The user can update these filters for every new query.
Right now, its not possible to render these filters as part of user's message in the UI as the handleSubmit already generates the message on its own with just the text.
Additional context
No response
The text was updated successfully, but these errors were encountered:
sahas-si
changed the title
Provide a way to customise the user message in useChat
ai-sdk/ui: Provide a way to customise the user message in useChat
Sep 12, 2024
Feature Description
Creating this enhancement issue as suggested by @lgrammel in this thread -> #2820
Current Scenario: In a conversation, user asks a query & assistant provides an answer. Both the query and response are represented as messages. By default, useChat's handleSubmit method generates the user's message & appends it to messages. There can be no customisation & its fixed.
Requirement: Many a times, user message can have more than a query/text, there could be an extra filters that user has selected. (Check the usecaseProvide a way for the user to add more attributes to the user's message either through a callback or via any other mechanism
Current code:
Use Case
Here's our usecase. We have a stock market based chat assistant. While asking a query, users can select the year/quarter/filing type from the filters & send these filters to the API. The user can update these filters for every new query.
Right now, its not possible to render these filters as part of user's message in the UI as the handleSubmit already generates the message on its own with just the text.
Additional context
No response
The text was updated successfully, but these errors were encountered: