MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/optillm / ChatCompletionChoice

Class ChatCompletionChoice

optillm/inference.py:1675–1687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1673 self.logprobs = logprobs
1674
1675class ChatCompletionChoice:
1676 def __init__(
1677 self,
1678 index: int,
1679 message: Dict[str, Any],
1680 finish_reason: str = "stop",
1681 logprobs: Optional[Dict] = None
1682 ):
1683 self.index = index
1684 self.message = ChatCompletionMessage(**message)
1685 self.finish_reason = finish_reason
1686 if logprobs:
1687 self.message.logprobs = logprobs
1688
1689class ChatCompletionUsage:
1690 def __init__(self, prompt_tokens: int, completion_tokens: int, total_tokens: int, reasoning_tokens: int = 0):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected