Skip to main content

prepare_gateway

Function prepare_gateway 

Source
pub fn prepare_gateway(
    session: &Session,
    runtime: &Runtime,
    visdom: &Path,
    now: i64,
) -> Result<Prepared, String>
Expand description

Everything the agent needs to run through the gateway: the developer’s key (the kept one, or a new one), a model alias and the ids that attribute the session. The second value holds what the developer should know (no model alias to ask for).

The LLM gateway is asked for its models with the key before anything is started: an agent pointed at a gateway that does not answer, or does not take the key, would run with nothing recording it. A kept key the gateway refuses (a newer one was issued elsewhere, which revoked it) is replaced once.