New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bavard/agent-config

Package Overview
Dependencies
Maintainers
2
Versions
316
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bavard/agent-config - npm Package Compare versions

Comparing version 0.1.50 to 0.1.51

4

dist/dialogue-manager/policy-executors/default-executor.js

@@ -50,3 +50,5 @@ "use strict";

const decisionConfidence = 1 - userAction.oodConfidence - config.intentConfidenceThreshold;
return new services_1.ActionCandidate([agentAction], decisionConfidence);
return decisionConfidence > 0
? new services_1.ActionCandidate([agentAction], decisionConfidence)
: undefined;
}

@@ -53,0 +55,0 @@ }

@@ -64,3 +64,5 @@ "use strict";

const decisionConfidence = result.confidence - config.dpConfidenceThreshold;
return new services_1.ActionCandidate(actions, decisionConfidence);
return decisionConfidence > 0
? new services_1.ActionCandidate(actions, decisionConfidence)
: undefined;
});

@@ -67,0 +69,0 @@ }

@@ -33,3 +33,5 @@ "use strict";

const action = Object.assign(Object.assign({}, kbPrediction), { name: "kb_search_result", type: enums_1.EAgentActionTypes.KB_SEARCH_RESULT_ACTION });
return new services_1.ActionCandidate([action], decisionConfidence);
return decisionConfidence > 0
? new services_1.ActionCandidate([action], decisionConfidence)
: undefined;
});

@@ -36,0 +38,0 @@ }

@@ -67,3 +67,3 @@ import { AgentConfig, IAgentAction, IAgentErrorAction, IAgentShopifyActionResult, IAgentUtteranceAction, IZendeskActionResult } from "..";

/**
* The action candidate's strength, in the range `[0,1]`. A greater strength
* The action candidate's strength, in the range `(0,1]`. A greater strength
* means the candidate is more confident in the agent actions its proposing.

@@ -70,0 +70,0 @@ */

@@ -15,5 +15,7 @@ "use strict";

constructor(actions, strength) {
if (strength <= 0) {
throw Error("actions candidates cannot have negative or zero strength");
}
this.actions = actions;
// Clip strength to be in the range `[0,1]`.
strength = Math.max(0, strength);
// Clip strength to be in the range `(0,1]`.
this.strength = Math.min(1, strength);

@@ -20,0 +22,0 @@ }

{
"name": "@bavard/agent-config",
"version": "0.1.50",
"version": "0.1.51",
"description": "Shared code and single source of truth for Bavard data models.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc