nip.code_validation.agents._ParsedChatCompletion#
- class nip.code_validation.agents._ParsedChatCompletion(next_messages: OrderedDict[str, str] | None, raw_message: str, prompt: list[PromptMessage], decision: int, retry_count: int, warning: Literal['max_tokens', 'invalid_response'] | None)[source]#
A parsed chat completion output.
- next_messages#
A dictionary mapping channel names to next messages, ordered by channel order. If the model has made a decision, this will be None.
- prompt#
The prompt used to generate the message.
- Type:
- decision#
The decision made by the agent. This is either 0 (reject), 1 (accept) or 2 (no decision).
- Type:
- warning#
The warning message from the generation, if any. One of:
“max_tokens”: If the generation was stopped because the maximum number of tokens was reached.
“invalid_response”: If the generation could not be parsed.
- Type:
Literal[“max_tokens”, “invalid_response”] | None
Methods Summary
__eq__
(other)Return self==value.
__init__
(next_messages, raw_message, prompt, ...)__repr__
()Return repr(self).
Attributes
Methods
- __eq__(other)#
Return self==value.
- __init__(next_messages: OrderedDict[str, str] | None, raw_message: str, prompt: list[PromptMessage], decision: int, retry_count: int, warning: Literal['max_tokens', 'invalid_response'] | None) None #
- __repr__()#
Return repr(self).