ConfigurableFieldSpec#
- class langchain_core.runnables.utils.ConfigurableFieldSpec(
- id: str,
- annotation: Any,
- name: str | None = None,
- description: str | None = None,
- default: Any = None,
- is_shared: bool = False,
- dependencies: list[str] | None = None,
Field that can be configured by the user. It is a specification of a field.
Create new instance of ConfigurableFieldSpec(id, annotation, name, description, default, is_shared, dependencies)
Attributes
annotation
The annotation of the field.
default
The default value for the field.
dependencies
The dependencies of the field.
description
The description of the field.
id
The unique identifier of the field.
is_shared
Whether the field is shared.
name
The name of the field.
Methods
count
(value, /)Return number of occurrences of value.
index
(value[, start, stop])Return first index of value.
- Parameters:
id (str)
annotation (Any)
name (str | None)
description (str | None)
default (Any)
is_shared (bool)
dependencies (list[str] | None)
- count(value, /)#
Return number of occurrences of value.
- index(
- value,
- start=0,
- stop=9223372036854775807,
- /,
Return first index of value.
Raises ValueError if the value is not present.
Examples using ConfigurableFieldSpec