Skip to content

Commit

Permalink
Merge pull request #3286 from huginn/better_default_options
Browse files Browse the repository at this point in the history
Better default options for PostAgent and WebhookAgent
  • Loading branch information
knu committed Jun 27, 2023
2 parents 8439a77 + 25bca1c commit 1fa0b10
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/models/agents/event_formatting_agent.rb
Expand Up @@ -65,6 +65,8 @@ class EventFormattingAgent < Agent
"1": "10:00 PM EST"
}
You could also use the `regex_extract` filter to achieve the same goal.
So you can use it in `instructions` like this:
"instructions": {
Expand Down Expand Up @@ -113,7 +115,6 @@ def default_options
'agent' => "{{agent.type}}",
'some_other_field' => "Looks like the weather is going to be {{fields.weather}}"
},
'matchers' => [],
'mode' => "clean",
}
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/agents/post_agent.rb
Expand Up @@ -83,7 +83,7 @@ def default_options
},
'headers' => {},
'emit_events' => 'false',
'no_merge' => 'false',
'no_merge' => 'true',
'output_mode' => 'clean'
}
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/agents/webhook_agent.rb
Expand Up @@ -47,9 +47,9 @@ class WebhookAgent < Agent

def default_options
{
"secret" => "supersecretstring",
"secret" => SecureRandom.uuid,
"expected_receive_period_in_days" => 1,
"payload_path" => "some_key",
"payload_path" => ".",
"event_headers" => "",
"event_headers_key" => "headers",
"score_threshold" => 0.5
Expand Down

0 comments on commit 1fa0b10

Please sign in to comment.