feat(agents): providing a seed so it has more predictable results

This commit is contained in:
2025-05-03 17:31:55 +01:00
parent 94920c01fb
commit 9860dd2dc5
2 changed files with 7 additions and 3 deletions

View File

@@ -25,6 +25,8 @@ type AgentRequestBody struct {
Tools *any `json:"tools,omitempty"`
ToolChoice *string `json:"tool_choice,omitempty"`
RandomSeed *int `json:"random_seed,omitempty"`
EndToolCall string `json:"-"`
Chat *Chat `json:"messages"`
@@ -238,11 +240,13 @@ func (client *AgentClient) RunAgent(userId uuid.UUID, imageId uuid.UUID, imageNa
}
toolChoice := "any"
seed := 42
request := AgentRequestBody{
Tools: &tools,
ToolChoice: &toolChoice,
Model: "pixtral-12b-2409",
RandomSeed: &seed,
Temperature: 0.3,
EndToolCall: client.Options.EndToolCall,
ResponseFormat: ResponseFormat{