fix: get screen size for planner
This commit is contained in:
parent
868acd45ac
commit
bbc05513f9
|
@ -1 +1 @@
|
|||
v5.0.0-beta-2503202039
|
||||
v5.0.0-beta-2503202053
|
||||
|
|
|
@ -2,6 +2,7 @@ package uixt
|
|||
|
||||
import (
|
||||
"github.com/cloudwego/eino/schema"
|
||||
"github.com/httprunner/httprunner/v5/code"
|
||||
"github.com/httprunner/httprunner/v5/uixt/ai"
|
||||
"github.com/httprunner/httprunner/v5/uixt/option"
|
||||
"github.com/pkg/errors"
|
||||
|
@ -17,6 +18,11 @@ func (dExt *XTDriver) PlanNextAction(text string, opts ...option.ActionOption) (
|
|||
return nil, err
|
||||
}
|
||||
|
||||
size, err := dExt.IDriver.WindowSize()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(code.DeviceGetInfoError, err.Error())
|
||||
}
|
||||
|
||||
planningOpts := &ai.PlanningOptions{
|
||||
UserInstruction: text,
|
||||
ConversationHistory: []*schema.Message{
|
||||
|
@ -32,6 +38,7 @@ func (dExt *XTDriver) PlanNextAction(text string, opts ...option.ActionOption) (
|
|||
},
|
||||
},
|
||||
},
|
||||
Size: size,
|
||||
}
|
||||
|
||||
result, err := dExt.LLMService.Call(planningOpts)
|
||||
|
|
Loading…
Reference in New Issue