LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Llms
  • Profile
  • Load
  • Serializable
  • Memory
  • Messages
  • Tool
  • Output Parsers
  • Openai Functions
  • Openai Tools
  • Outputs
  • Prompt Values
  • Prompts
  • Retrievers
  • Document Compressors
  • Runnables
  • Graph
  • Singletons
  • Stores
  • Structured Query
  • Tools
  • Base
  • Console
  • Log Stream
  • Run Collector
  • Tracer Langchain
  • Stream
  • Async Caller
  • Chunk Array
  • Context
  • Env
  • Event Source Parse
  • Format
  • Function Calling
  • Hash
  • Json Patch
  • Json Schema
  • Math
  • Ssrf
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangChain
UniversalHubNodeLoadSerializableEncoder BackedFile SystemIn Memory
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsLlmsProfileLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingHashJson PatchJson SchemaMathSsrfStreamTestingTiktokenTypesVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScript@langchain/corelanguage_modelsllmsBaseLLMParams
Interface●Since v1.0

BaseLLMParams

Base interface for language model parameters. A subclass of BaseLanguageModel should have a constructor that takes in a parameter that extends this interface.

Copy
interface BaseLLMParams

Bases

BaseLanguageModelParams

Properties

property
cache: boolean | BaseCache<Generation[]>
property
callbacks: Callbacks

Callbacks for this call and any sub-calls (eg. a Chain calling an LLM). Tags are passed to all callbacks, metadata is passed to handle*Start callbacks.

property
maxConcurrency: number

Maximum number of parallel calls to make.

property
maxRetries: number

The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6.

property
metadata: Record<string, unknown>
property
onFailedAttempt: FailedAttemptHandler

Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable.

property
tags: string[]
property
verbose: boolean
deprecatedproperty
callbackManager: CallbackManager

Inherited fromBaseLanguageModelParams

Properties

Pcache: BaseCache<Generation[]>PcallbackManager: CallbackManagerPcallbacks: Callbacks
—

Callbacks for this call and any sub-calls (eg. a Chain calling an LLM).

PmaxConcurrency: number
—

Maximum number of parallel calls to make.

PmaxRetries: number
—

The maximum number of retries that can be made for a single call,

Pmetadata: Record<string, unknown>PonFailedAttempt: FailedAttemptHandler
—

Custom handler to handle failed attempts. Takes the originally thrown

Ptags: string[]Pverbose: boolean

Inherited fromAsyncCallerParams

Properties

PmaxConcurrency: number
—

Maximum number of parallel calls to make.

PmaxRetries: number
—

The maximum number of retries that can be made for a single call,

PonFailedAttempt: FailedAttemptHandler
—

Custom handler to handle failed attempts. Takes the originally thrown

Inherited fromBaseLangChainParams

Properties

Pcallbacks: Callbacks
—

Callbacks for this call and any sub-calls (eg. a Chain calling an LLM).

Pmetadata: Record<string, unknown>Ptags: string[]Pverbose: boolean
View source on GitHub