aiq.data_models.component_ref#
Classes#
A node type for component runtime instances reference names in a networkx digraph. |
|
Abstract class used for the interface to derive ComponentRef objects. |
|
A reference to an embedder in an AIQ Toolkit configuration object. |
|
A reference to a function in an AIQ Toolkit configuration object. |
|
A reference to an LLM in an AIQ Toolkit configuration object. |
|
A reference to a memory in an AIQ Toolkit configuration object. |
|
A reference to a retriever in an AIQ Toolkit configuration object. |
Functions#
|
Generates a unique identifier for a python object derived from its python unique id. |
Module Contents#
- generate_instance_id(input_object: Any) str #
Generates a unique identifier for a python object derived from its python unique id.
- Args:
input_object (typing.Any): The input object to receive a unique identifier.
- Returns:
str: Unique identifier.
- class ComponentRefNode(/, **data: Any)#
Bases:
aiq.data_models.common.HashableBaseModel
A node type for component runtime instances reference names in a networkx digraph.
- Args:
ref_name (ComponentRef): The name of the component runtime instance. component_group (ComponentGroup): The component group in an AIQ Toolkit configuration object.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.- ref_name: ComponentRef#
- component_group: aiq.data_models.component.ComponentGroup#
- class ComponentRef#
-
Abstract class used for the interface to derive ComponentRef objects.
Initialize self. See help(type(self)) for accurate signature.
- property component_group: aiq.data_models.component.ComponentGroup#
- Abstractmethod:
Provides the component group this ComponentRef object represents.
- Returns:
ComponentGroup: A component group of the AIQ Toolkit configuration object
- class EmbedderRef#
Bases:
ComponentRef
A reference to an embedder in an AIQ Toolkit configuration object.
Initialize self. See help(type(self)) for accurate signature.
- property component_group#
Provides the component group this ComponentRef object represents.
- Returns:
ComponentGroup: A component group of the AIQ Toolkit configuration object
- class FunctionRef#
Bases:
ComponentRef
A reference to a function in an AIQ Toolkit configuration object.
Initialize self. See help(type(self)) for accurate signature.
- property component_group#
Provides the component group this ComponentRef object represents.
- Returns:
ComponentGroup: A component group of the AIQ Toolkit configuration object
- class LLMRef#
Bases:
ComponentRef
A reference to an LLM in an AIQ Toolkit configuration object.
Initialize self. See help(type(self)) for accurate signature.
- property component_group#
Provides the component group this ComponentRef object represents.
- Returns:
ComponentGroup: A component group of the AIQ Toolkit configuration object
- class MemoryRef#
Bases:
ComponentRef
A reference to a memory in an AIQ Toolkit configuration object.
Initialize self. See help(type(self)) for accurate signature.
- property component_group#
Provides the component group this ComponentRef object represents.
- Returns:
ComponentGroup: A component group of the AIQ Toolkit configuration object
- class RetrieverRef#
Bases:
ComponentRef
A reference to a retriever in an AIQ Toolkit configuration object.
Initialize self. See help(type(self)) for accurate signature.
- property component_group#
Provides the component group this ComponentRef object represents.
- Returns:
ComponentGroup: A component group of the AIQ Toolkit configuration object