gen_ai_hub.orchestration.models.document_grounding
index
/home/jenkins/agent/workspace/ation_generative-ai-hub-sdk_main/gen_ai_hub/orchestration/models/document_grounding.py

 
Classes
       
builtins.str(builtins.object)
DataRepositoryType(builtins.str, enum.Enum)
GroundingType(builtins.str, enum.Enum)
enum.Enum(builtins.object)
DataRepositoryType(builtins.str, enum.Enum)
GroundingType(builtins.str, enum.Enum)
gen_ai_hub.orchestration.models.base.JSONSerializable(abc.ABC)
DocumentGrounding
DocumentGroundingFilter
DocumentMetadata
GroundingFilterSearch
GroundingModule

 
class DataRepositoryType(builtins.str, enum.Enum)
    DataRepositoryType(value, names=None, *, module=None, qualname=None, type=None, start=1)
 
Enumerates data repository types.
 
 
Method resolution order:
DataRepositoryType
builtins.str
enum.Enum
builtins.object

Data and other attributes defined here:
MS_SHAREPOINT = <DataRepositoryType.MS_SHAREPOINT: 'MSSHAREPOINT'>
URL = <DataRepositoryType.URL: 'url'>
VECTOR = <DataRepositoryType.VECTOR: 'vector'>

Data descriptors inherited from enum.Enum:
name
The name of the Enum member.
value
The value of the Enum member.

Readonly properties inherited from enum.EnumMeta:
__members__
Returns a mapping of member name->value.
 
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.

 
class DocumentGrounding(gen_ai_hub.orchestration.models.base.JSONSerializable)
    DocumentGrounding(input_params: List[str], output_param: str, filters: List[gen_ai_hub.orchestration.models.document_grounding.DocumentGroundingFilter] = None, metadata_params: [&lt;class 'str'&gt;] = None)
 
defines the detailed configuration for the Grounding module.
 
Args:
    filters: List of DocumentGroundingFilter objects.
    input_params: The list of input parameters used for grounding input questions.
    output_param: Parameter name used for grounding output.
    metadata_params: Parameter name used for specifying metadata parameters.
 
 
Method resolution order:
DocumentGrounding
gen_ai_hub.orchestration.models.base.JSONSerializable
abc.ABC
builtins.object

Methods defined here:
__init__(self, input_params: List[str], output_param: str, filters: List[gen_ai_hub.orchestration.models.document_grounding.DocumentGroundingFilter] = None, metadata_params: [<class 'str'>] = None)
Initialize self.  See help(type(self)) for accurate signature.
to_dict(self)
Convert the object to a JSON-serializable dictionary.

Data and other attributes defined here:
__abstractmethods__ = frozenset()
__annotations__ = {}

Data descriptors inherited from gen_ai_hub.orchestration.models.base.JSONSerializable:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class DocumentGroundingFilter(gen_ai_hub.orchestration.models.base.JSONSerializable)
    DocumentGroundingFilter(id: str, data_repository_type: str, search_config: gen_ai_hub.orchestration.models.document_grounding.GroundingFilterSearch = None, data_repositories: List[str] = None, data_repository_metadata: List[Dict[str, Any]] = None, document_metadata: gen_ai_hub.orchestration.models.document_grounding.DocumentMetadata = None, chunk_metadata: List[Dict[str, Any]] = None)
 
Module for configuring document grounding filters.
 
Args:
    id: The unique identifier for the grounding filter.
    search_config: GroundingFilterSearchConfiguration object.
    data_repository_type: Only include DataRepositories with the given type:
                          'vector' or 'url' of website supporting elastic search.
    data_repositories: list of data repositories to search.
                       Specify ['*'] to search across all DataRepositories or
                       give a specific list of DataRepository ids.
    data_repository_metadata: The metadata for the data repository.
                              Restrict DataRepositories considered during search to those annotated with the given
                              metadata. Useful when combined with dataRepositories=['*']
    document_metadata: DocumentMetadata object.
    chunk_metadata: Restrict chunks considered during search to those with the given metadata.
 
 
Method resolution order:
DocumentGroundingFilter
gen_ai_hub.orchestration.models.base.JSONSerializable
abc.ABC
builtins.object

Methods defined here:
__init__(self, id: str, data_repository_type: str, search_config: gen_ai_hub.orchestration.models.document_grounding.GroundingFilterSearch = None, data_repositories: List[str] = None, data_repository_metadata: List[Dict[str, Any]] = None, document_metadata: gen_ai_hub.orchestration.models.document_grounding.DocumentMetadata = None, chunk_metadata: List[Dict[str, Any]] = None)
Initialize self.  See help(type(self)) for accurate signature.
to_dict(self)
Convert the object to a JSON-serializable dictionary.

Data and other attributes defined here:
__abstractmethods__ = frozenset()
__annotations__ = {}

Data descriptors inherited from gen_ai_hub.orchestration.models.base.JSONSerializable:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class DocumentMetadata(gen_ai_hub.orchestration.models.base.JSONSerializable)
    DocumentMetadata(key: str, value: List[str], select_mode: List[str] = None)
 
Restrict documents considered during search to those annotated with the given metadata.
 
Args:
    key: The key for the metadata.
    value: The list of values for the metadata.
    select_mode: Select mode for search filters.
 
 
Method resolution order:
DocumentMetadata
gen_ai_hub.orchestration.models.base.JSONSerializable
abc.ABC
builtins.object

Methods defined here:
__init__(self, key: str, value: List[str], select_mode: List[str] = None)
Initialize self.  See help(type(self)) for accurate signature.
to_dict(self)
Convert the object to a JSON-serializable dictionary.

Data and other attributes defined here:
__abstractmethods__ = frozenset()
__annotations__ = {}

Data descriptors inherited from gen_ai_hub.orchestration.models.base.JSONSerializable:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class GroundingFilterSearch(gen_ai_hub.orchestration.models.base.JSONSerializable)
    GroundingFilterSearch(max_chunk_count: int = None, max_document_count: int = None)
 
Search configuration for the data repository.
 
Args:
    max_chunk_count: The maximum number of chunks > 0 to return.
    max_document_count: The maximum number of documents > 0 to return.
                        Only supports 'vector' dataRepositoryType.
                        Cannot be used with 'maxChunkCount'.
                        If maxDocumentCount is given, then only one chunk per document is returned.
 
 
Method resolution order:
GroundingFilterSearch
gen_ai_hub.orchestration.models.base.JSONSerializable
abc.ABC
builtins.object

Methods defined here:
__init__(self, max_chunk_count: int = None, max_document_count: int = None)
Initialize self.  See help(type(self)) for accurate signature.
to_dict(self)
Convert the object to a JSON-serializable dictionary.

Data and other attributes defined here:
__abstractmethods__ = frozenset()
__annotations__ = {}

Data descriptors inherited from gen_ai_hub.orchestration.models.base.JSONSerializable:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class GroundingModule(gen_ai_hub.orchestration.models.base.JSONSerializable)
    GroundingModule(type: str, config: gen_ai_hub.orchestration.models.document_grounding.DocumentGrounding)
 
Module for managing and applying grounding aka RAG configurations.
 
Args:
    type: The type of the grounding module.
    config: Configuration dictionary for the grounding module.
 
 
Method resolution order:
GroundingModule
gen_ai_hub.orchestration.models.base.JSONSerializable
abc.ABC
builtins.object

Methods defined here:
__init__(self, type: str, config: gen_ai_hub.orchestration.models.document_grounding.DocumentGrounding)
Initialize self.  See help(type(self)) for accurate signature.
to_dict(self)
Convert the object to a JSON-serializable dictionary.

Data and other attributes defined here:
__abstractmethods__ = frozenset()
__annotations__ = {}

Data descriptors inherited from gen_ai_hub.orchestration.models.base.JSONSerializable:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class GroundingType(builtins.str, enum.Enum)
    GroundingType(value, names=None, *, module=None, qualname=None, type=None, start=1)
 
Enumerates supported grounding types.
 
 
Method resolution order:
GroundingType
builtins.str
enum.Enum
builtins.object

Data and other attributes defined here:
DOCUMENT_GROUNDING_SERVICE = <GroundingType.DOCUMENT_GROUNDING_SERVICE: 'document_grounding_service'>

Data descriptors inherited from enum.Enum:
name
The name of the Enum member.
value
The value of the Enum member.

Readonly properties inherited from enum.EnumMeta:
__members__
Returns a mapping of member name->value.
 
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.

 
Data
        Any = typing.Any
Dict = typing.Dict
List = typing.List