MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / CustomLLM

Class CustomLLM

bmtools/models/customllm.py:6–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4from typing import Optional, List, Mapping, Any
5
6class CustomLLM(LLM):
7
8 n: int = 0
9
10 @property
11 def _llm_type(self) -> str:
12 return "custom"
13
14 def _call(self, prompt: str, stop: Optional[List[str]] = None) -> str:
15 output = "your customized response"
16
17 return output
18
19 @property
20 def _identifying_params(self) -> Mapping[str, Any]:
21 """Get the identifying parameters."""
22 return {"n": self.n}
23
24if __name__ == "__main__":
25 llm = CustomLLM()

Callers 3

cpu_diagnosis_agentFunction · 0.90
memory_diagnosis_agentFunction · 0.90
customllm.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected