Skip to content

Commit a2039cf

Browse files
committed
require_model for the app bricks
1 parent f0f9030 commit a2039cf

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

internal/orchestrator/bricks/bricks.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ func (s *Service) AppBrickInstancesList(a *app.ArduinoApp) (AppBrickInstancesRes
8989
Author: "Arduino", // TODO: for now we only support our bricks
9090
Category: brick.Category,
9191
Status: "installed",
92+
ModelRequired: brick.ModelRequired,
9293
ModelID: brickInstance.Model, // TODO: in case is not set by the user, should we return the default model?
9394
Variables: variablesMap, // TODO: do we want to show also the default value of not explicitly set variables?
9495
ConfigVariables: configVariables,

internal/orchestrator/bricks/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ type BrickInstance struct {
4242
Status string `json:"status"`
4343
Variables map[string]string `json:"variables,omitempty" description:"Deprecated: use config_variables instead. This field is kept for backward compatibility."`
4444
ConfigVariables []BrickConfigVariable `json:"config_variables,omitempty"`
45+
ModelRequired bool `json:"model_required,omitempty"`
4546
ModelID string `json:"model,omitempty"`
4647
CompatibleModels []AIModel `json:"compatible_models"`
4748
}

internal/orchestrator/orchestrator.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,9 +673,10 @@ type AppDetailedInfo struct {
673673
}
674674

675675
type AppDetailedBrick struct {
676-
ID string `json:"id" required:"true"`
677-
Name string `json:"name" required:"true"`
678-
Category string `json:"category,omitempty"`
676+
ID string `json:"id" required:"true"`
677+
Name string `json:"name" required:"true"`
678+
Category string `json:"category,omitempty"`
679+
ModelRequired bool `json:"model_required,omitempty"`
679680
}
680681

681682
func AppDetails(
@@ -738,6 +739,7 @@ func AppDetails(
738739
}
739740
res.Name = bi.Name
740741
res.Category = bi.Category
742+
res.ModelRequired = bi.ModelRequired
741743
return res
742744
}),
743745
}, nil

0 commit comments

Comments
 (0)