src/thought -> src/agent
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
39d6ca3fe0
commit
2f0c7ce5c2
21 changed files with 57 additions and 141 deletions
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
use crate::user::api::ApiClient;
|
||||
use crate::user::types::*;
|
||||
use crate::thought::{self, ProcessTracker};
|
||||
use crate::agent::{self, ProcessTracker};
|
||||
|
||||
use std::sync::OnceLock;
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ pub async fn call_api_with_tools(
|
|||
let (ui_tx, mut ui_rx) = crate::user::ui_channel::channel();
|
||||
|
||||
// All available native tools for subconscious agents
|
||||
let all_tools = thought::memory_and_journal_definitions();
|
||||
let all_tools = agent::memory_and_journal_definitions();
|
||||
// If agent header specifies a tools whitelist, filter to only those
|
||||
let tool_defs: Vec<_> = if tools.is_empty() {
|
||||
all_tools
|
||||
|
|
@ -175,9 +175,9 @@ pub async fn call_api_with_tools(
|
|||
};
|
||||
|
||||
let prov = provenance.borrow().clone();
|
||||
let output = match thought::dispatch(&call.function.name, &args, &tracker, Some(&prov)).await {
|
||||
let output = match agent::dispatch(&call.function.name, &args, &tracker, Some(&prov)).await {
|
||||
Some(out) => out,
|
||||
None => thought::ToolOutput::error(format!("Unknown tool: {}", call.function.name)),
|
||||
None => agent::ToolOutput::error(format!("Unknown tool: {}", call.function.name)),
|
||||
};
|
||||
|
||||
if std::env::var("POC_AGENT_VERBOSE").is_ok() {
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ fn run_one_agent_inner(
|
|||
_llm_tag: &str,
|
||||
log: &(dyn Fn(&str) + Sync),
|
||||
) -> Result<AgentResult, String> {
|
||||
let all_tools = crate::thought::memory_and_journal_definitions();
|
||||
let all_tools = crate::agent::memory_and_journal_definitions();
|
||||
let effective_tools: Vec<String> = if def.tools.is_empty() {
|
||||
all_tools.iter().map(|t| t.function.name.clone()).collect()
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue