langchain_experimental.rl_chain.pick_best_chain
.PickBestRandomPolicy¶
- class langchain_experimental.rl_chain.pick_best_chain.PickBestRandomPolicy(feature_embedder: Embedder, **kwargs: Any)[源代码]¶
随机策略用于选择最佳链。
方法
__init__
(feature_embedder, **kwargs)learn
(event)log
(event)predict
(event)save
()- 参数
feature_embedder (base.Embedder) –
kwargs (Any) –
- __init__(feature_embedder: Embedder, **kwargs: Any)[源代码]¶
- 参数
feature_embedder (Embedder) –
kwargs (Any) –
- learn(event: PickBestEvent) None [源代码]¶
- 参数
event (PickBestEvent) –
- 返回类型
None
- log(event: PickBestEvent) None [源代码]¶
- 参数
event (PickBestEvent) –
- 返回类型
None
- predict(event: PickBestEvent) List[Tuple[int, float]] [源代码]¶
- 参数
event (PickBestEvent) –
- 返回类型
列表[元组[int, float]]
- save() None ¶
- 返回类型
None