← Về thư mục
src/models.py
- build_language_model · function · L11-L15 — def build_language_model(llm_config: LLMConfig)
- LanguageModel · class · L18-L120 — class LanguageModel
- init · method · L20-L48 — def init(self, llm_config: LLMConfig)
- call · method · L50-L104 — def call(self, batch_messages: List[List[Dict[str, str]]], task_name: str = "default") -> Dict[str, Any]
- _process_outputs · method · L106-L117 — def _process_outputs(self, outputs)
- get_token_usage_summary · method · L119-L120 — def get_token_usage_summary(self)
- EmbeddingModel · class · L123-L162 — class EmbeddingModel
- init · method · L125-L145 — def init(self, embedding_config: EmbeddingConfig, device: str = None)
- encode · method · L147-L162 — def encode(self, texts: Union[str, List[str]], normalize_embeddings: bool = True, show_progress_bar: bool = False) -> Union[List[float], List[List[float]]]
- OpenRouterLanguageModel · class · L165-L338 — class OpenRouterLanguageModel
- init · method · L182-L220 — def init(self, llm_config: LLMConfig)
- call · method · L222-L269 — def call(self, batch_messages: List[List[Dict[str, str]]], task_name: str = "default") -> Dict[str, Any]
- _complete_one_query · method · L271-L314 — def _complete_one_query(self, messages: List[Dict[str, str]], task_name: str) -> Tuple[str, int, int]
- _backoff_seconds · method · L316-L321 — def _backoff_seconds(self, attempt: int, error: Exception) -> float
- _parse_retry_after · method · L324-L335 — def _parse_retry_after(error: Exception) -> Optional[float]
- get_token_usage_summary · method · L337-L338 — def get_token_usage_summary(self)