langchain_core.runnables.config
.RunnableConfig¶
- class langchain_core.runnables.config.RunnableConfig[source]¶
一个可运行的配置。
Attributes
tags
这个调用及其子调用的标签(例如,一个链调用一个LLM)。 您可以使用这些标签来过滤调用。
metadata
这个调用以及任何子调用的元数据(例如,一个链调用LLM)。 键应该是字符串,值应该是可JSON序列化的。
callbacks
这个调用和任何子调用的回调(例如,一个链调用一个LLM)。 标签被传递给所有回调函数,元数据被传递给handle*Start回调函数。
run_name
调用此函数的跟踪运行的名称。默认为类的名称。
max_concurrency
最大并行调用次数。如果未提供,默认为ThreadPoolExecutor的默认值。
recursion_limit
递归调用的最大次数。如果未提供,默认为25。
configurable
通过.configurable_fields()或.configurable_alternatives()在此Runnable或子Runnable上之前已经使得属性的运行时值可配置。查看.output_schema()以获取已经可配置的属性的描述。
run_id
为此调用的跟踪运行的唯一标识符。如果未提供,将生成一个新的UUID。
Methods
__init__
(*args, **kwargs)clear
()copy
()fromkeys
([value])Create a new dictionary with keys from iterable and values set to value.
get
(key[, default])Return the value for key if key is in the dictionary, else default.
items
()keys
()pop
(k[,d])If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem
()Remove and return a (key, value) pair as a 2-tuple.
setdefault
(key[, default])Insert key with a value of default if key is not in the dictionary.
update
([E, ]**F)If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
values
()- __init__(*args, **kwargs)¶
- clear() None. Remove all items from D. ¶
- copy() a shallow copy of D ¶
- fromkeys(value=None, /)¶
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)¶
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items ¶
- keys() a set-like object providing a view on D's keys ¶
- pop(k[, d]) v, remove specified key and return the corresponding value. ¶
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem()¶
Remove and return a (key, value) pair as a 2-tuple.
Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.
- setdefault(key, default=None, /)¶
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from dict/iterable E and F. ¶
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values ¶