Dummy LLM#

A dummy LLM for when you need to provide an LLM but don’t care for a real one.

This is similar to the Fake LLM, except that it errors out on attempted usage. This is to allow you to ensure that this dummy LLM is truly not being used.

[4]:
from langchain_contrib.llms import DummyLanguageModel

try:
    llm = DummyLanguageModel()
    llm.generate_prompt(["Tell me something"])
except Exception as e:
    print(f"Error: {e}")
Error: You're using the dummy LLM