mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-07 16:40:50 +08:00
fix: get screen size for planner
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v5.0.0-beta-2503202039
|
v5.0.0-beta-2503202053
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package uixt
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cloudwego/eino/schema"
|
"github.com/cloudwego/eino/schema"
|
||||||
|
"github.com/httprunner/httprunner/v5/code"
|
||||||
"github.com/httprunner/httprunner/v5/uixt/ai"
|
"github.com/httprunner/httprunner/v5/uixt/ai"
|
||||||
"github.com/httprunner/httprunner/v5/uixt/option"
|
"github.com/httprunner/httprunner/v5/uixt/option"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@@ -17,6 +18,11 @@ func (dExt *XTDriver) PlanNextAction(text string, opts ...option.ActionOption) (
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size, err := dExt.IDriver.WindowSize()
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.Wrap(code.DeviceGetInfoError, err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
planningOpts := &ai.PlanningOptions{
|
planningOpts := &ai.PlanningOptions{
|
||||||
UserInstruction: text,
|
UserInstruction: text,
|
||||||
ConversationHistory: []*schema.Message{
|
ConversationHistory: []*schema.Message{
|
||||||
@@ -32,6 +38,7 @@ func (dExt *XTDriver) PlanNextAction(text string, opts ...option.ActionOption) (
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Size: size,
|
||||||
}
|
}
|
||||||
|
|
||||||
result, err := dExt.LLMService.Call(planningOpts)
|
result, err := dExt.LLMService.Call(planningOpts)
|
||||||
|
|||||||
Reference in New Issue
Block a user