main::helpers::general

Function ai_task_request

source
pub async fn ai_task_request(
    msg_context: String,
    agent_position: &str,
    agent_operation: &str,
    function_pass: for<'a> fn(_: &'a str) -> &'static str,
) -> String
Expand description

Sends a request to the AI service with a provided message context and function. It calls the call_gpt function to interact with the OpenAI API, printing relevant agent messages.