LLM Integration

class LLMIntegration

This captures the integration of an LLM provider. It is designed to be subclassed and implemented for a specific LLM provider. It has one method, complete, which takes some untrusted input and returns the LLM’s output, unfiltered.

abstract complete(untrusted_input: str) str

Send the untrusted input to the LLM and return the LLM’s output.

Parameters:

untrusted_input (str) – The untrusted input from the user, but almost always wrapped in a PromptEnvelope.

Returns:

The untrusted output from the LLM.

Return type:

str