Skip to main content

LLM

The LLM type initializes a Large Language Model (LLM).

ENV TYPE

You use an LLM in conjunction with Env. The Env type is used to represent the environment in which an LLM operates. It allows the LLM to interact with inputs and outputs, such as directories, containers, and custom modules.

Common operations​

Some of the common operations available on the LLM type include:

FieldDescription
modelReturns the model used by the LLM
lastReplyReturns the last reply from the LLM
historyReturns the LLM message history
withEnvAllows the LLM to interact with an environment
withPromptAppends a prompt to the LLM context
withPromptFileAppends a prompt file to the LLM context
withPromptVarAdds a string variable to the LLM context
withModelSets the model used by the LLM