Toggle Menu
Prev Up Next

# `langchain_experimental.rl_chain.base`.Policy

class langchain_experimental.rl_chain.base.Policy(**kwargs: Any)

  Abstract class to represent a policy.

  Methods

  `__init__`(**kwargs) |
  `learn`(event) |
  `log`(event) |
  `predict`(event) |
  `save`() |

  Parameters

    kwargs (Any) –

  __init__(**kwargs: Any)
    Parameters

      kwargs (Any) –

  abstract learn(event: TEvent) → None
    Parameters

      event (TEvent) –

    Return type

      None

  abstract log(event: TEvent) → None
    Parameters

      event (TEvent) –

    Return type

      None

  abstract predict(event: TEvent) → Any
    Parameters

      event (TEvent) –

    Return type

      Any

  save() → None
    Return type

      None