MCPcopy Index your code
hub / github.com/dataease/SQLBot / __hash__

Method __hash__

backend/apps/ai_model/model_factory.py:33–47  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31 frozen = True
32
33 def __hash__(self):
34 if hasattr(self, 'additional_params') and isinstance(self.additional_params, dict):
35 hashable_params = frozenset((k, tuple(v) if isinstance(v, (list, dict)) else v)
36 for k, v in self.additional_params.items())
37 else:
38 hashable_params = None
39
40 return hash((
41 self.model_id,
42 self.model_type,
43 self.model_name,
44 self.api_key,
45 self.api_base_url,
46 hashable_params
47 ))
48
49
50class BaseLLM(ABC):

Callers

nothing calls this directly

Calls 2

hashFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected