factor_agent.llm.base#

The one external seam: an LLM backend turns a request into a reply.

Classes

AskingAgain

A backend that asks backend again when it answers something that is not a reply.

LLMBackend

Anything that completes a request.

Reply

The provider's answer: its text, token usage as the provider reports it and the model that answered.

Request

One call: the role making it, the model, the prompt and the sampling parameters.

Functions

backend_options

The options a role's config on the backend name may give besides backend and model.

backends

The backends a role's config may name, each name to its class.

make_backend

Build the backend a role's config names in spec["backend"].

refuse_secrets

Refuse a role's config on the backend name whose options (their names) hold a key.