MCPcopy Index your code
hub / github.com/IBM/AssetOpsBench / LLMResult

Class LLMResult

src/llm/base.py:10–19  ·  view source on GitHub ↗

Return type for :meth:`LLMBackend.generate_with_usage`. ``input_tokens`` / ``output_tokens`` are ``0`` when the backend can't report usage (e.g. mocks in unit tests).

Source from the content-addressed store, hash-verified

8
9@dataclass(frozen=True)
10class LLMResult:
11 """Return type for :meth:`LLMBackend.generate_with_usage`.
12
13 ``input_tokens`` / ``output_tokens`` are ``0`` when the backend can't
14 report usage (e.g. mocks in unit tests).
15 """
16
17 text: str
18 input_tokens: int = 0
19 output_tokens: int = 0
20
21
22class LLMBackend(ABC):

Callers 4

generate_with_usageMethod · 0.90
generate_with_usageMethod · 0.85
generate_with_usageMethod · 0.85
generate_with_usageMethod · 0.85

Calls

no outgoing calls

Tested by 1

generate_with_usageMethod · 0.72