MCPcopy
hub / github.com/langchain-ai/langchain / RunnableConfig

Class RunnableConfig

libs/core/langchain_core/runnables/config.py:56–105  ·  view source on GitHub ↗

Configuration for a Runnable.

Source from the content-addressed store, hash-verified

54
55
56class RunnableConfig(TypedDict, total=False):
57 """Configuration for a Runnable."""
58
59 tags: List[str]
60 """
61 Tags for this call and any sub-calls (eg. a Chain calling an LLM).
62 You can use these to filter calls.
63 """
64
65 metadata: Dict[str, Any]
66 """
67 Metadata for this call and any sub-calls (eg. a Chain calling an LLM).
68 Keys should be strings, values should be JSON-serializable.
69 """
70
71 callbacks: Callbacks
72 """
73 Callbacks for this call and any sub-calls (eg. a Chain calling an LLM).
74 Tags are passed to all callbacks, metadata is passed to handle*Start callbacks.
75 """
76
77 run_name: str
78 """
79 Name for the tracer run for this call. Defaults to the name of the class.
80 """
81
82 max_concurrency: Optional[int]
83 """
84 Maximum number of parallel calls to make. If not provided, defaults to
85 ThreadPoolExecutor's default.
86 """
87
88 recursion_limit: int
89 """
90 Maximum number of times a call can recurse. If not provided, defaults to 25.
91 """
92
93 configurable: Dict[str, Any]
94 """
95 Runtime values for attributes previously made configurable on this Runnable,
96 or sub-Runnables, through .configurable_fields() or .configurable_alternatives().
97 Check .output_schema() for a description of the attributes that have been made
98 configurable.
99 """
100
101 run_id: Optional[uuid.UUID]
102 """
103 Unique identifier for the tracer run for this call. If not provided, a new UUID
104 will be generated.
105 """
106
107
108var_child_runnable_config = ContextVar(

Callers 12

_arun_llmFunction · 0.90
_arun_chainFunction · 0.90
_run_llmFunction · 0.90
_run_chainFunction · 0.90
prepareMethod · 0.90
compress_documentsMethod · 0.90
acompress_documentsMethod · 0.90
config.pyFile · 0.85
ensure_configFunction · 0.85

Calls

no outgoing calls

Tested by 3