← Về thư mục
src/chain_of_thought.py
- remove_think_tags · function · L12-L13 — def remove_think_tags(text: str) -> str
- ChainOfThought · class · L16-L173 — class ChainOfThought
- init · method · L21-L37 — def init( self, agent: Agent, model: LanguageModel, task_type: str, num_reasoning_paths: int = 1, self_consistency: bool = False, ) -> None
- run · method · L39-L120 — def run(self, queries: List[Query]) -> List[Dict[str, Any]]
- _attach_retrieved_memories · method · L122-L135 — def _attach_retrieved_memories(self, result: Dict[str, Any], prefetched) -> None
- _build_cot_messages · method · L137-L141 — def _build_cot_messages(self, query: Query, prefetched=None) -> List[Dict[str, str]]
- _check_consensus · method · L143-L165 — def _check_consensus(self, reasoning_paths: List[str], consensus_threshold: float = 0.8) -> tuple[bool, str]
- save_cot_log · method · L167-L170 — def save_cot_log(self, filename: str) -> None
- get_token_usage_summary · method · L172-L173 — def get_token_usage_summary(self)