2023-08-18 11:09:30 +00:00
|
|
|
import logging
|
|
|
|
|
2023-08-18 07:42:17 +00:00
|
|
|
from langchain.chains.rl_chain.base import (
|
2023-08-18 06:02:01 +00:00
|
|
|
AutoSelectionScorer,
|
2023-08-18 11:09:30 +00:00
|
|
|
BasedOn,
|
|
|
|
Embed,
|
2023-08-18 06:02:01 +00:00
|
|
|
Embedder,
|
|
|
|
Policy,
|
2023-08-18 11:09:30 +00:00
|
|
|
SelectionScorer,
|
|
|
|
ToSelectFrom,
|
2023-08-18 06:02:01 +00:00
|
|
|
VwPolicy,
|
|
|
|
)
|
2023-08-18 11:09:30 +00:00
|
|
|
from langchain.chains.rl_chain.pick_best_chain import PickBest
|
2023-08-18 06:02:01 +00:00
|
|
|
|
|
|
|
|
2023-08-28 12:13:23 +00:00
|
|
|
def configure_logger() -> None:
|
2023-08-18 06:02:01 +00:00
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
logger.setLevel(logging.INFO)
|
|
|
|
ch = logging.StreamHandler()
|
|
|
|
formatter = logging.Formatter(
|
|
|
|
"%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
|
|
)
|
|
|
|
ch.setFormatter(formatter)
|
|
|
|
ch.setLevel(logging.INFO)
|
|
|
|
logger.addHandler(ch)
|
|
|
|
|
|
|
|
|
|
|
|
configure_logger()
|
2023-08-18 11:09:30 +00:00
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
"PickBest",
|
|
|
|
"Embed",
|
|
|
|
"BasedOn",
|
|
|
|
"ToSelectFrom",
|
|
|
|
"SelectionScorer",
|
|
|
|
"AutoSelectionScorer",
|
|
|
|
"Embedder",
|
|
|
|
"Policy",
|
|
|
|
"VwPolicy",
|
|
|
|
]
|