mirror of
https://github.com/RightNow-AI/openfang.git
synced 2026-08-14 08:52:02 +00:00
fmt drift
This commit is contained in:
@@ -6027,9 +6027,10 @@ impl OpenFangKernel {
|
||||
// Multi-destination fan-out (never aborts the job on delivery error).
|
||||
cron_fan_out_targets(self, job_name, &result.response, &delivery_targets)
|
||||
.await;
|
||||
let delivered_to_channel = cron_deliver_response(self, agent_id, &result.response, &delivery)
|
||||
.await
|
||||
.is_ok();
|
||||
let delivered_to_channel =
|
||||
cron_deliver_response(self, agent_id, &result.response, &delivery)
|
||||
.await
|
||||
.is_ok();
|
||||
// Publish event for WS broadcast (API layer subscribes and pushes to WebSocket connections).
|
||||
let cron_event = Event::new(
|
||||
AgentId::new(),
|
||||
@@ -6050,7 +6051,8 @@ impl OpenFangKernel {
|
||||
self.cron_scheduler.record_success(job_id);
|
||||
Ok(result.response)
|
||||
} else {
|
||||
self.cron_scheduler.record_failure(job_id, "channel delivery failed");
|
||||
self.cron_scheduler
|
||||
.record_failure(job_id, "channel delivery failed");
|
||||
Err("channel delivery failed".to_string())
|
||||
}
|
||||
}
|
||||
@@ -6095,9 +6097,10 @@ impl OpenFangKernel {
|
||||
Ok(Ok((_run_id, output))) => {
|
||||
// Multi-destination fan-out (never aborts the job on delivery error).
|
||||
cron_fan_out_targets(self, job_name, &output, &delivery_targets).await;
|
||||
let delivered_to_channel = cron_deliver_response(self, agent_id, &output, &delivery)
|
||||
.await
|
||||
.is_ok();
|
||||
let delivered_to_channel =
|
||||
cron_deliver_response(self, agent_id, &output, &delivery)
|
||||
.await
|
||||
.is_ok();
|
||||
// Publish event for WS broadcast (API layer subscribes and pushes to WebSocket connections).
|
||||
let cron_event = Event::new(
|
||||
AgentId::new(),
|
||||
@@ -6116,7 +6119,8 @@ impl OpenFangKernel {
|
||||
self.cron_scheduler.record_success(job_id);
|
||||
Ok(output)
|
||||
} else {
|
||||
self.cron_scheduler.record_failure(job_id, "channel delivery failed");
|
||||
self.cron_scheduler
|
||||
.record_failure(job_id, "channel delivery failed");
|
||||
Err("channel delivery failed".to_string())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -896,9 +896,7 @@ fn derive_capabilities(tools: &[String]) -> AgentCapabilities {
|
||||
"shell_exec" => {
|
||||
caps.shell = vec!["*".to_string()];
|
||||
}
|
||||
"web_fetch" | "web_search" | "browser_navigate"
|
||||
if caps.network.is_empty() =>
|
||||
{
|
||||
"web_fetch" | "web_search" | "browser_navigate" if caps.network.is_empty() => {
|
||||
caps.network = vec!["*".to_string()];
|
||||
}
|
||||
"agent_send" | "agent_list" => {
|
||||
|
||||
@@ -129,12 +129,7 @@ impl MediaEngine {
|
||||
.config
|
||||
.audio_base_url
|
||||
.as_deref()
|
||||
.map(|base| {
|
||||
format!(
|
||||
"{}/v1/audio/transcriptions",
|
||||
base.trim_end_matches('/')
|
||||
)
|
||||
})
|
||||
.map(|base| format!("{}/v1/audio/transcriptions", base.trim_end_matches('/')))
|
||||
.unwrap_or_else(|| {
|
||||
"https://api.groq.com/openai/v1/audio/transcriptions".to_string()
|
||||
});
|
||||
@@ -148,12 +143,7 @@ impl MediaEngine {
|
||||
.config
|
||||
.audio_base_url
|
||||
.as_deref()
|
||||
.map(|base| {
|
||||
format!(
|
||||
"{}/v1/audio/transcriptions",
|
||||
base.trim_end_matches('/')
|
||||
)
|
||||
})
|
||||
.map(|base| format!("{}/v1/audio/transcriptions", base.trim_end_matches('/')))
|
||||
.unwrap_or_else(|| {
|
||||
"https://api.openai.com/v1/audio/transcriptions".to_string()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user