Download modules/dialog_manager/state.py from recommender-system/llmproccrs: direct link, hf CLI and curl.
- Browser
- Download file 900 Bytes
-
https://huggingface.co/recommender-system/llmproccrs/resolve/main/modules/dialog_manager/state.py
- Command line
-
hf download hf://recommender-system/llmproccrs/modules/dialog_manager/state.py
-
curl -L -o state.py https://huggingface.co/recommender-system/llmproccrs/resolve/main/modules/dialog_manager/state.py
900 Bytes
| from typing import TypedDict, List, Dict, Any | |
| class ChatState(TypedDict): | |
| # --- INPUT --- | |
| user_text: str | |
| # --- CONTEXT --- | |
| histories: List[str] # Log percakapan ["User: A", "Bot: B"] | |
| intent: str # 'basa_basi', 'cari_produk' | |
| topic_status: str # 'same', 'changed' | |
| # --- DATA PROCESSING (UMS) --- | |
| entities: List[Dict] # Entitas mentah turn ini | |
| collected_constraints: Dict # Akumulasi entitas (Product, Price, Location) | |
| relaxed_query: str # Query semantic string | |
| # --- REASONING RESULT (RRE) --- | |
| candidates: List[Dict] # List produk hasil filter | |
| candidate_count: int # Jumlah hasil | |
| # --- OUTPUT (DMS) --- | |
| final_response: str # Jawaban bot ke user | |
| done: bool # Flag jika flow selesai (opsional) |