mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
change: rename VLM name
This commit is contained in:
@@ -129,12 +129,12 @@ func GetModelConfig(modelType option.LLMServiceType) (*ModelConfig, error) {
|
||||
|
||||
func validateModelType(modelType option.LLMServiceType, modelName string) error {
|
||||
switch modelType {
|
||||
case option.LLMServiceTypeUITARS:
|
||||
case option.DOUBAO_1_5_UI_TARS_250428:
|
||||
if !strings.Contains(modelName, "ui-tars") {
|
||||
return fmt.Errorf("model name %s is not supported for %s", modelName, modelType)
|
||||
}
|
||||
return nil
|
||||
case option.LLMServiceTypeDoubaoVL:
|
||||
case option.DOUBAO_1_5_THINKING_VISION_PRO_250428:
|
||||
if !strings.Contains(modelName, "doubao") || !strings.Contains(modelName, "vision") {
|
||||
return fmt.Errorf("model name %s is not supported", modelName)
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func NewAsserter(ctx context.Context, modelConfig *ModelConfig) (*Asserter, erro
|
||||
systemPrompt: defaultAssertionPrompt,
|
||||
}
|
||||
|
||||
if modelConfig.ModelType == option.LLMServiceTypeUITARS {
|
||||
if modelConfig.ModelType == option.DOUBAO_1_5_UI_TARS_250428 {
|
||||
asserter.systemPrompt += "\n" + uiTarsAssertionResponseFormat
|
||||
} else {
|
||||
// define output format
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func createAsserter(t *testing.T) *Asserter {
|
||||
modelConfig, err := GetModelConfig(option.LLMServiceTypeUITARS)
|
||||
modelConfig, err := GetModelConfig(option.DOUBAO_1_5_UI_TARS_250428)
|
||||
require.NoError(t, err)
|
||||
asserter, err := NewAsserter(context.Background(), modelConfig)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -19,7 +19,7 @@ type LLMContentParser interface {
|
||||
|
||||
func NewLLMContentParser(modelType option.LLMServiceType) LLMContentParser {
|
||||
switch modelType {
|
||||
case option.LLMServiceTypeUITARS:
|
||||
case option.DOUBAO_1_5_UI_TARS_250428:
|
||||
return &UITARSContentParser{
|
||||
systemPrompt: doubao_1_5_ui_tars_planning_prompt,
|
||||
actionMapping: doubao_1_5_ui_tars_action_mapping,
|
||||
|
||||
@@ -64,7 +64,7 @@ func (p *Planner) History() *ConversationHistory {
|
||||
}
|
||||
|
||||
func (p *Planner) RegisterTools(tools []*schema.ToolInfo) error {
|
||||
if p.modelConfig.ModelType == option.LLMServiceTypeUITARS {
|
||||
if p.modelConfig.ModelType == option.DOUBAO_1_5_UI_TARS_250428 {
|
||||
// tools have been registered in ui-tars system prompt
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func TestVLMPlanning(t *testing.T) {
|
||||
|
||||
userInstruction += "\n\n请基于以上游戏规则,给出下一步可点击的两个图标坐标"
|
||||
|
||||
modelConfig, err := GetModelConfig(option.LLMServiceTypeUITARS)
|
||||
modelConfig, err := GetModelConfig(option.DOUBAO_1_5_UI_TARS_250428)
|
||||
require.NoError(t, err)
|
||||
|
||||
planner, err := NewPlanner(context.Background(), modelConfig)
|
||||
@@ -72,7 +72,7 @@ func TestXHSPlanning(t *testing.T) {
|
||||
|
||||
userInstruction := "点击第二个帖子的作者头像"
|
||||
|
||||
modelConfig, err := GetModelConfig(option.LLMServiceTypeUITARS)
|
||||
modelConfig, err := GetModelConfig(option.DOUBAO_1_5_UI_TARS_250428)
|
||||
require.NoError(t, err)
|
||||
|
||||
planner, err := NewPlanner(context.Background(), modelConfig)
|
||||
@@ -115,7 +115,7 @@ func TestChatList(t *testing.T) {
|
||||
|
||||
userInstruction := "请结合图片的文字信息,请告诉我一共有多少个群聊,哪些群聊右下角有绿点"
|
||||
|
||||
modelConfig, err := GetModelConfig(option.LLMServiceTypeUITARS)
|
||||
modelConfig, err := GetModelConfig(option.DOUBAO_1_5_UI_TARS_250428)
|
||||
require.NoError(t, err)
|
||||
|
||||
planner, err := NewPlanner(context.Background(), modelConfig)
|
||||
@@ -147,7 +147,7 @@ func TestChatList(t *testing.T) {
|
||||
|
||||
func TestHandleSwitch(t *testing.T) {
|
||||
userInstruction := "检查发送框下方的联网搜索开关,蓝色为开启状态,灰色为关闭状态;若开关处于关闭状态,则点击进行开启"
|
||||
modelConfig, err := GetModelConfig(option.LLMServiceTypeUITARS)
|
||||
modelConfig, err := GetModelConfig(option.DOUBAO_1_5_UI_TARS_250428)
|
||||
require.NoError(t, err)
|
||||
|
||||
planner, err := NewPlanner(context.Background(), modelConfig)
|
||||
|
||||
Reference in New Issue
Block a user