nip.code_validation.agents

nip.code_validation.agents#

Code validation agent components.

To integrate easily into the codebase, the code validation agents a split into three parts: the body, the policy head, and the value head. However, for text classification, the split is not necessary, so only the policy head actually does anything. The body and value head return the input data unchanged.

Classes

CodeValidationAgent(hyper_params, agent_name)

A class representing a code validation agent.

CodeValidationCombinedWholeAgent(...)

Module which combines all agents for code validation.

CodeValidationRandomAgentPolicyHead(...)

Random agent for code validation, yielding random strings.

OpenAiSharedModelGroup(hyper_params, ...)

A class representing a group of code validation OpenAI agents sharing a model.

OpenAiSharedModelGroupState([...])

The state of an OpenAI shared model group.

OpenAiWholeAgent(hyper_params, settings, ...)

The whole agent for code validation, using OpenAI's API.

_ParsedChatCompletion(next_messages, ...)

A parsed chat completion output.

Exceptions

AgentNotActiveInChannelError

Error raised when an agent is not active in a channel.