spine-framework 0.3.110 → 0.3.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -175,7 +175,8 @@ export async function runAgent(
|
|
|
175
175
|
)
|
|
176
176
|
|
|
177
177
|
// 4. Check confidence and escalate if needed
|
|
178
|
-
|
|
178
|
+
const isEscalated = agentResponse.confidence < (promptConfig.confidence_threshold || 0)
|
|
179
|
+
if (isEscalated) {
|
|
179
180
|
await handleEscalation(
|
|
180
181
|
threadId,
|
|
181
182
|
agentResponse.confidence,
|
|
@@ -204,6 +205,7 @@ export async function runAgent(
|
|
|
204
205
|
agent_id: agent.id,
|
|
205
206
|
prompt_config_id: promptConfig.id,
|
|
206
207
|
sender_type: 'agent',
|
|
208
|
+
escalated: isEscalated,
|
|
207
209
|
},
|
|
208
210
|
ctx,
|
|
209
211
|
replyTypeSlug
|