Skip to content

Commit 340bbbf

Browse files
Saranya-jenaHarness
authored andcommitted
chore: [ML-1241]: updated the service chat struct with new field and fixed an exisitng bug with toll schema (#82)
* chore: [ML-1241]: updated the service chat struct with new field Signed-off-by: Saranya-jena <[email protected]>
1 parent dc59b30 commit 340bbbf

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

client/dto/genai.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ const (
4646
CreateProcess RequestAction = "CREATE_PROCESS"
4747
)
4848

49+
type Caller string
50+
51+
const (
52+
CallerUnifiedAgent Caller = "unified_agent"
53+
)
54+
4955
type ServiceChatParameters struct {
5056
Prompt string `json:"prompt"`
5157
Provider string `json:"provider,omitempty"`
@@ -58,6 +64,7 @@ type ServiceChatParameters struct {
5864
Action RequestAction `json:"action,omitempty"`
5965
HarnessContext *HarnessContext `json:"harness_context,omitempty"`
6066
Stream bool `json:"stream,omitempty"`
67+
Caller Caller `json:"caller,omitempty"`
6168
}
6269

6370
type CapabilityToRun struct {

pkg/harness/tools/genai.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func AIDevOpsAgentTool(config *config.Config, client *client.GenaiService) (tool
4444
"payload": map[string]any{
4545
"type": []string{"object", "array", "string", "number", "boolean"},
4646
"description": "The payload for this context item, accepts any valid JSON value. Example: {\"stage_type\": \"Custom\"}",
47+
"items": map[string]any{},
4748
},
4849
},
4950
"required": []string{"type", "payload"},
@@ -164,6 +165,7 @@ func AIDevOpsAgentTool(config *config.Config, client *client.GenaiService) (tool
164165
Action: dto.RequestAction(strings.ToUpper(action)),
165166
HarnessContext: harnessContext,
166167
Stream: stream,
168+
Caller: dto.CallerUnifiedAgent,
167169
}
168170

169171
shouldStream := stream && progressToken != nil

0 commit comments

Comments
 (0)