ConfigurableFieldSingleOption#

class langchain_core.runnables.utils.ConfigurableFieldSingleOption(
id: str,
options: Mapping[str, Any],
default: str,
name: str | None = None,
description: str | None = None,
is_shared: bool = False,
)[source]#

Field that can be configured by the user with a default value.

Create new instance of ConfigurableFieldSingleOption(id, options, default, name, description, is_shared)

Attributes

default

The default value for 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.

options

The options for the field.

Methods

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

Parameters:
  • id (str)

  • options (Mapping[str, Any])

  • default (str)

  • name (str | None)

  • description (str | None)

  • is_shared (bool)

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.