refactor: move code

This commit is contained in:
lilong.129
2025-04-27 22:32:06 +08:00
parent 9bcdd5d19a
commit 7fa4155390
5 changed files with 51 additions and 53 deletions

View File

@@ -106,16 +106,6 @@ type combinedLLMService struct {
asserter IAsserter // 提供断言功能
}
// IPlanner 定义了规划功能接口
type IPlanner interface {
Call(opts *PlanningOptions) (*PlanningResult, error)
}
// IAsserter 定义了断言功能接口
type IAsserter interface {
Assert(opts *AssertOptions) (*AssertionResponse, error)
}
// Call 执行规划功能
func (c *combinedLLMService) Call(opts *PlanningOptions) (*PlanningResult, error) {
return c.planner.Call(opts)

View File

@@ -15,6 +15,10 @@ import (
"github.com/rs/zerolog/log"
)
type IAsserter interface {
Assert(opts *AssertOptions) (*AssertionResponse, error)
}
// UI-TARS assertion system prompt
const uiTarsAssertionPrompt = `You are a senior testing engineer. User will give an assertion and a screenshot of a page. By carefully viewing the screenshot, please tell whether the assertion is truthy.

View File

@@ -17,6 +17,10 @@ import (
"github.com/rs/zerolog/log"
)
type IPlanner interface {
Call(opts *PlanningOptions) (*PlanningResult, error)
}
// PlanningOptions represents the input options for planning
type PlanningOptions struct {
UserInstruction string `json:"user_instruction"` // append to system prompt