LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Browser
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
  • Tools
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Compat
  • Event
  • Llms
  • Openai Completions Stream
  • Profile
  • Stream
  • Structured Output
  • Load
  • Serializable
  • Memory
  • Messages
  • Tool
  • Output Parsers
  • Openai Functions
  • Openai Tools
  • Outputs
  • Prompt Values
  • Prompts
  • Retrievers
  • Document Compressors
  • Runnables
  • Graph
  • Singletons
  • Stores
  • Structured Query
  • Testing
  • 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
  • Standard Schema
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Uuid
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangChain
BrowserUniversalHubNodeLoadSerializableEncoder BackedFile SystemIn MemoryTools
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsCompatEventLlmsOpenai Completions StreamProfileStreamStructured OutputLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryTestingToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingHashJson PatchJson SchemaMathSsrfStandard SchemaStreamTestingTiktokenTypesUuidVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScriptlangchainbrowserFakeToolCallingModel
Class●Since v1.3

FakeToolCallingModel

Fake chat model for testing tool calling functionality

Copy
class FakeToolCallingModel

Bases

BaseChatModel

Constructors

Properties

Methods

Inherited fromBaseChatModel(langchain_core)

Attributes

Arate_limiterAdisable_streamingAoutput_versionAmodel_config
View source on GitHub
A
OutputType

Methods

MainvokeMastreamMstream_eventsMastream_eventsMagenerateMgenerate_promptMagenerate_promptMdictMasdictMbindMbind_toolsMwith_structured_output

Inherited fromBaseLanguageModel(langchain_core)

Attributes

Acustom_get_token_idsAmodel_configAInputType

Methods

Mmodel_post_initMset_verboseMgenerate_promptMagenerate_promptMwith_structured_outputMget_token_idsMget_num_tokensMget_num_tokens_from_messages

Inherited fromRunnableSerializable(langchain_core)

Attributes

Amodel_config

Methods

Mto_jsonMconfigurable_fieldsMconfigurable_alternatives

Inherited fromSerializable(langchain_core)

Attributes

Amodel_config

Methods

Mis_lc_serializableMget_lc_namespaceMto_jsonMto_json_not_implemented

Inherited fromRunnable(langchain_core)

Attributes

AInputTypeAOutputTypeAinput_schemaAoutput_schemaAconfig_specs

Methods

Mget_nameMget_input_schemaMget_input_jsonschemaMget_output_schemaMget_output_jsonschemaMconfig_schema
constructor
constructor
property
cache: BaseCache<Generation[]>
property
callbacks: Callbacks
property
caller: AsyncCaller
property
disableStreaming: boolean
property
lc_kwargs: SerializedFields
property
lc_namespace: string[]
property
lc_runnable: boolean
property
lc_serializable: boolean
property
metadata: Record<string, unknown>
property
name: string
property
outputVersion: MessageOutputVersion
property
ParsedCallOptions: Omit<CallOptions, Exclude<keyof RunnableConfig, "signal" | "timeout" | "maxConcurrency">>
property
structuredResponse: any
property
tags: string[]
property
toolCalls: ToolCall[][]
property
toolStyle: "openai" | "anthropic"
property
verbose: boolean
property
callKeys
property
index
property
lc_aliases
property
lc_attributes
property
lc_id
property
lc_secrets
property
lc_serializable_keys
property
profile
method
_addVersion
method
_batchWithConfig
method
_callWithConfig
method
_combineLLMOutput
method
_filterInvocationParamsForTracing
method
_generate
method
_generateCached
method
_getOptionsList
method
_getSerializedCacheKeyParametersForCall
method
_identifyingParams
method
_llmType
method
_modelType
method
_separateRunnableConfigFromCallOptions
method
_separateRunnableConfigFromCallOptionsCompat
method
_streamChatModelEvents
method
_streamIterator
method
_streamLog
method
_streamResponseChunks
method
_transformStreamWithConfig
method
assign
method
asTool
method
batch
method
bindTools
method
generate
method
generatePrompt
method
getGraph
method
getLsParams
method
getLsParamsWithDefaults
method
getName
method
getNumTokens
method
invocationParams
method
invoke
method
pick
method
pipe
method
serialize
method
stream
method
streamEvents
method
streamLog
method
streamV2
method
toJSON
method
toJSONNotImplemented
method
transform
method
withConfig
method
withFallbacks
method
withListeners
method
withRetry
method
withStructuredOutput
method
_convertInputToPromptValue
method
deserialize
method
isRunnable
method
lc_name
Mget_config_jsonschema
Mget_graph
Mget_prompts
Mainvoke
Mbatch_as_completed
Mabatch
Mabatch_as_completed
Mastream
Mastream_log
Mastream_events
Mstream_events
Matransform
Mbind
Mwith_config
Mwith_listeners
Mwith_alisteners
Mwith_types
Mwith_retry
Mmap
Mwith_fallbacks
Mas_tool