Judge Invoker
Helpers for judge invokers: language-model (BaseLMInvoker) or decisions-model (BaseDMInvoker).
chain_has_dm(*groups)
Check whether any invoker in the given groups is a decisions-model invoker.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*groups
|
BaseLMInvoker | BaseDMInvoker | list[BaseLMInvoker | BaseDMInvoker] | None
|
Groups to inspect. |
()
|
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if at least one invoker is a |
is_dm_invoker(invoker)
Check whether an object is a decisions-model invoker.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
invoker
|
object
|
The object to check. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the object is a |
iter_judges(*groups)
Flatten None, single-invoker and list groups into one list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*groups
|
BaseLMInvoker | BaseDMInvoker | list[BaseLMInvoker | BaseDMInvoker] | None
|
Groups to flatten. |
()
|
Returns:
| Type | Description |
|---|---|
list[BaseLMInvoker | BaseDMInvoker]
|
list[BaseLMInvoker | BaseDMInvoker]: All invokers, in the order given. |