-
Notifications
You must be signed in to change notification settings - Fork 178
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: create llm basic dispute bot #4630
feat: create llm basic dispute bot #4630
Conversation
UMA-1760 Create LLM dispute bot wrapper base
Create a base to run bot that can be run in our infrastructure, with a signer that can use the LLM modules to dispute requests when necessary. |
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! Only minor nits and comments about future development/follow-ups!
} from "../core/OptimisticOracleV2"; | ||
import { Logger, MonitoringParams } from "./common"; | ||
|
||
export async function disputeDisputableRequests(logger: typeof Logger, params: MonitoringParams): Promise<void> { |
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.
This is really cool how simple this turned out! I think there's some more we can do to generalize the "runner" so a user can configure each part of the pipeline independently (like swap out the filter purely via the env or cli args, for instance), but I think that's probably something to do in a future PR. This is perfect!
|
||
const filteredRequests = await oov2FilterDisputable.filter(requests); | ||
|
||
const disputable = await Promise.all(filteredRequests.map(DisputerStrategy.process)); |
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.
Is process() a static method on DisputerStrategy? Are all strategies intended to be built that way? Seems like stated unless might ultimately be necessary for future (non trivial) strategies. Either way, that's something we can worry about in a follow up PR.
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.
can any of these calls error? i usually try to avoid processing things in a list like this since errors can prevent some from executing. if no errors are expected though this is fine
pollingDelay: number; | ||
} | ||
|
||
export const initMonitoringParams = async (env: NodeJS.ProcessEnv): Promise<MonitoringParams> => { |
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: monitoring -> bot (or LLMBot)
@@ -0,0 +1,27 @@ | |||
# LLM Dispute Bot |
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.
As usual, 👌 documentation!
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.
came together really nice
|
||
const filteredRequests = await oov2FilterDisputable.filter(requests); | ||
|
||
const disputable = await Promise.all(filteredRequests.map(DisputerStrategy.process)); |
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.
can any of these calls error? i usually try to avoid processing things in a list like this since errors can prevent some from executing. if no errors are expected though this is fine
timer: TimerEthers; | ||
} | ||
|
||
export const umaEcosystemFixture = hre.deployments.createFixture( |
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.
this was a lot of work just to set up the testing! is this something we would want to reuse?
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
dabe696
to
12a02dc
Compare
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
Motivation
This is a basic LLM dispute bot scaffolding to be completed once we have LLM strategies. Depends on #4629
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
Issue(s)
Fixes #XXXX