MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / _run_agent

Function _run_agent

aiscript-vm/src/ai/agent.rs:257–273  ·  view source on GitHub ↗
(
    state: &mut State<'gc>,
    agent: Gc<'gc, Agent<'gc>>,
    args: Vec<Value<'gc>>,
)

Source from the content-addressed store, hash-verified

255
256#[cfg(feature = "ai_test")]
257pub async fn _run_agent<'gc>(
258 state: &mut State<'gc>,
259 agent: Gc<'gc, Agent<'gc>>,
260 args: Vec<Value<'gc>>,
261) -> Value<'gc> {
262 let message = args[0];
263 let debug = args[1].as_boolean();
264 println!("debug: {debug}");
265 make_response_object(
266 state,
267 agent,
268 format!(
269 "input: {},instructions: {}, model: {}, tools: {:?}",
270 message, agent.instructions, agent.model, agent.tools
271 ),
272 )
273}
274
275#[cfg(not(feature = "ai_test"))]
276pub async fn _run_agent<'gc>(

Callers 1

run_agentFunction · 0.85

Calls 8

make_response_objectFunction · 0.85
openai_clientFunction · 0.85
as_booleanMethod · 0.80
pushMethod · 0.80
get_toolsMethod · 0.80
handle_tool_callMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected