llms library

Contains core abstractions related to LLMs.

Classes

BaseLLM<Options extends LLMOptions>
Large Language Models base class.
FakeEchoLLM
Fake LLM for testing. It just returns the prompt or streams it char by char.
FakeHandlerLLM
Fake LLM for testing. It returns the string returned by the handler function.
FakeLLM
Fake LLM for testing. You can pass in a list of responses to return in order when called.
FakeLLMOptions
Fake LLM options for testing.
LLMOptions
Options to pass into the LLM.
LLMResult
Result returned by the LLM.
SimpleLLM<Options extends LLMOptions>
SimpleLLM provides a simplified interface for working with LLMs. Rather than expecting the user to implement the full SimpleLLM.invoke method, the user only needs to implement SimpleLLM.callInternal.