-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(product-assistant): trends generation failover #25769
Conversation
7598454
to
680ea43
Compare
…posthog into feat/trends-generation-failover
…generation-failover
…generation-failover
Size Change: 0 B Total Size: 1.15 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
Triggered by this commit. |
…posthog into feat/trends-generation-failover
…generation-failover
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.
LGTM
frontend/src/scenes/max/maxLogic.ts
Outdated
@@ -18,6 +29,11 @@ export type ThreadMessage = RootAssistantMessage & { | |||
status?: MessageStatus | |||
} | |||
|
|||
const failureMessage: FailureMessage = { |
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.
Nit: Global constants are typically SCREAMING_SNAKE_CASE, e.g. FAILURE_MESSAGE
Problem
There is always a chance that the schema generation step will produce an incorrect schema. Instead of showing an error to the user, we can ask LLMs to fix the error and make a new result based on the validation errors. This step will be repeated multiple times until it reaches a working schema or the recursion limit.
Changes
Add an optional fail-over step for the agent:
Additionally, I added handling of network/parsing errors, so it shows a similar error message.
Does this work well for both Cloud and self-hosted?
N/A
How did you test this code?
Unit tests + manual testing