mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-25 01:59:52 +08:00
refactor: move code
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user