OSSS.ai.llm.stub¶
OSSS.ai.llm.stub
¶
StubLLM
¶
Bases: LLMInterface
A stubbed LLM class used for testing without incurring API costs or making external calls.
generate(prompt, *, system_prompt=None, stream=False, on_log=None, **kwargs)
¶
Generate a mock response for a given prompt. This simulates the behavior of a real LLM.
Parameters¶
prompt : str The input text prompt to simulate a response for. system_prompt : str, optional System prompt to provide context/instructions. Included in mock response. stream : bool, optional If True, simulate streaming output. Ignored in this stub. on_log : Callable[[str], None], optional Optional logging callback for tracing messages. Ignored in this stub. **kwargs : dict Additional keyword arguments (ignored in this stub).
Returns¶
LLMResponse A canned response object.