MCPcopy Create free account
hub / github.com/Mercury7353/PyBench / BaseLLM

Class BaseLLM

llms/base_llm.py:9–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8
9class BaseLLM(ABC):
10 def __init__(self, llm_config: LLMConfig):
11 self.config = llm_config
12
13 @abstractmethod
14 def generate(
15 self,
16 messages: List[Union[Message, Dict]],
17 tools: Optional[List[Union[Tool, Dict]]] = None,
18 ) -> Tuple[Message, DebugInfo]:
19 """接受用户传入的messages和tools[可选],返回新的message和debug_info
20 Args:
21 messages: chatml messages
22 tools = openai tools description
23 Returns:
24 new_message, debug_info
25 """
26 ...

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected