Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(inference): use ops module for local ai calls

Steven Enamakel883bd8283bca
diff --git a/crates/openhuman-core/src/inference/ops.rs b/crates/openhuman-core/src/inference/ops.rs
index f492b3863a..339f17e9db 100644
--- a/crates/openhuman-core/src/inference/ops.rs
+++ b/crates/openhuman-core/src/inference/ops.rs
@@ -44,7 +44,7 @@ fn expected_test_provider_model_error_kind(
pub async fn inference_status(config: &Config) -> Result<Outcome<LocalAiStatus>, String> {
debug!("{LOG_PREFIX} status:start");
- let result = local_runtime::rpc::local_ai_status(config).await;
+ let result = local_runtime::ops::local_ai_status(config).await;
match &result {
Ok(outcome) => debug!(state = %outcome.value.state, "{LOG_PREFIX} status:ok"),
Err(err) => warn!(error = %err, "{LOG_PREFIX} status:error"),
@@ -62,7 +62,7 @@ pub async fn inference_summarize(
?max_tokens,
"{LOG_PREFIX} summarize:start"
);
- let result = local_runtime::rpc::local_ai_summarize(config, text, max_tokens).await;
+ let result = local_runtime::ops::local_ai_summarize(config, text, max_tokens).await;
match &result {
Ok(outcome) => debug!(
output_len = outcome.value.len(),
@@ -85,7 +85,7 @@ pub async fn inference_prompt(
?no_think,
"{LOG_PREFIX} prompt:start"
);
- let result = local_runtime::rpc::local_ai_prompt(config, prompt, max_tokens, no_think).await;
+ let result = local_runtime::ops::local_ai_prompt(config, prompt, max_tokens, no_think).await;
match &result {
Ok(outcome) => debug!(output_len = outcome.value.len(), "{LOG_PREFIX} prompt:ok"),
Err(err) => warn!(error = %err, "{LOG_PREFIX} prompt:error"),
@@ -106,7 +106,7 @@ pub async fn inference_vision_prompt(
"{LOG_PREFIX} vision_prompt:start"
);
let result =
- local_runtime::rpc::local_ai_vision_prompt(config, prompt, image_refs, max_tokens).await;
+ local_runtime::ops::local_ai_vision_prompt(config, prompt, image_refs, max_tokens).await;
match &result {
Ok(outcome) => debug!(
output_len = outcome.value.len(),