gen_ai_hub.orchestration_v2.models packageΒΆ
- class gen_ai_hub.orchestration_v2.models.AzureContentFilter(*, hate: AzureThreshold | Literal[0, 2, 4, 6] | None = None, sexual: AzureThreshold | Literal[0, 2, 4, 6] | None = None, violence: AzureThreshold | Literal[0, 2, 4, 6] | None = None, self_harm: AzureThreshold | Literal[0, 2, 4, 6] | None = None)ΒΆ
Bases:
ABCBaseModelSpecific filter configuration for Azure Content Safety.
This class configures content filtering based on Azureβs categories and severity levels. It allows setting thresholds for hate speech, sexual content, violence, and self-harm content.
- Parameters:
hate β Threshold for hate speech content.
sexual β Threshold for sexual content.
violence β Threshold for violent content.
self_harm β Threshold for self-harm content.
prompt_shield β A flag to use prompt shield
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- hate: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- sexual: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- violence: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- self_harm: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.AzureContentSafetyInput(*, hate: AzureThreshold | Literal[0, 2, 4, 6] | None = None, sexual: AzureThreshold | Literal[0, 2, 4, 6] | None = None, violence: AzureThreshold | Literal[0, 2, 4, 6] | None = None, self_harm: AzureThreshold | Literal[0, 2, 4, 6] | None = None, prompt_shield: bool | None = False)ΒΆ
Bases:
AzureContentFilterFilter configuration for Azure Content Safety Input
- Parameters:
hate β Threshold for hate speech content.
sexual β Threshold for sexual content.
violence β Threshold for violent content.
self_harm β Threshold for self-harm content.
prompt_shield β A flag to use prompt shield
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- prompt_shield: bool | NoneΒΆ
- hate: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- sexual: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- violence: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- self_harm: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.AzureContentSafetyOutput(*, hate: AzureThreshold | Literal[0, 2, 4, 6] | None = None, sexual: AzureThreshold | Literal[0, 2, 4, 6] | None = None, violence: AzureThreshold | Literal[0, 2, 4, 6] | None = None, self_harm: AzureThreshold | Literal[0, 2, 4, 6] | None = None, protected_material_code: bool | None = False)ΒΆ
Bases:
AzureContentFilterFilter configuration for Azure Content Safety Output
- Parameters:
hate β Threshold for hate speech content.
sexual β Threshold for sexual content.
violence β Threshold for violent content.
self_harm β Threshold for self-harm content.
protected_material_code β Detect protected code content from known GitHub repositories. The scan includes software libraries, source code, algorithms, and other proprietary programming content.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- protected_material_code: bool | NoneΒΆ
- hate: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- sexual: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- violence: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- self_harm: AzureThreshold | Literal[0, 2, 4, 6] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.AzureThreshold(*values)ΒΆ
Bases:
int,EnumEnumerates the threshold levels for the Azure Content Safety service.
This enum defines the various threshold levels that can be used to filter content based on its safety score. Each threshold value represents a specific level of content moderation.
- Values:
ALLOW_SAFE: Allows only Safe content. ALLOW_SAFE_LOW: Allows Safe and Low content. ALLOW_SAFE_LOW_MEDIUM: Allows Safe, Low, and Medium content. ALLOW_ALL: Allows all content (Safe, Low, Medium, and High).
- ALLOW_SAFE = 0ΒΆ
- ALLOW_SAFE_LOW = 2ΒΆ
- ALLOW_SAFE_LOW_MEDIUM = 4ΒΆ
- ALLOW_ALL = 6ΒΆ
- class gen_ai_hub.orchestration_v2.models.ModuleConfig(*, prompt_templating: PromptTemplatingModuleConfig, filtering: FilteringModuleConfig | None = None, masking: MaskingModuleConfig | None = None, grounding: GroundingModuleConfig | None = None, translation: TranslationModuleConfig | None = None)ΒΆ
Bases:
ABCBaseModelConfiguration for the Orchestration Serviceβs content generation process.
Defines modules for a harmonized API that combines LLM-based content generation with additional processing functionalities.
The orchestration service allows for advanced content generation by processing inputs through a series of steps: template rendering, text generation via LLMs, and optional input/output transformations such as data masking or filtering.
- Parameters:
prompt_templating β Template object for rendering input prompts and language model for text generation.
filtering β Module for filtering and validating input/output content.
masking β Module for anonymizing or pseudonymizing sensitive information.
grounding β Module for document grounding.
translation β Module for translating input and output content.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- prompt_templating: PromptTemplatingModuleConfigΒΆ
- filtering: FilteringModuleConfig | NoneΒΆ
- masking: MaskingModuleConfig | NoneΒΆ
- grounding: GroundingModuleConfig | NoneΒΆ
- translation: TranslationModuleConfig | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.OrchestrationConfig(*, modules: ModuleConfig | Annotated[List[ModuleConfig], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])], stream: GlobalStreamOptions | None = None)ΒΆ
Bases:
ABCBaseModelConfiguration for the Orchestration Serviceβs content generation process.
- Parameters:
modules β Either a single ModuleConfig or a list of ModuleConfigs. When a list is provided,
succeeds. (the orchestration service will try each configuration in order until one)
stream β Optional streaming configuration.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- modules: ModuleConfig | Annotated[List[ModuleConfig], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=1)])]ΒΆ
- stream: GlobalStreamOptions | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.CompletionRequestConfigurationReferenceByIdConfigRef(*, id: str)ΒΆ
Bases:
ABCBaseModelRepresents a reference to an orchestration config identified by a unique ID.
- Parameters:
id (str) β The unique identifier for the configuration.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: strΒΆ
- class gen_ai_hub.orchestration_v2.models.CompletionRequestConfigurationReferenceByNameScenarioVersionConfigRef(*, scenario: str, name: str, version: str)ΒΆ
Bases:
ABCBaseModelRepresents a reference to aan orchestration config identified by name, scenario, and version.
- Parameters:
scenario (str) β Scenario name
name (str) β Name of config
version (str) β Version of config
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- scenario: strΒΆ
- name: strΒΆ
- version: strΒΆ
- class gen_ai_hub.orchestration_v2.models.ContentFilterProvider(*values)ΒΆ
Bases:
str,EnumEnumerates supported content filter providers.
This enum defines the available content filtering services that can be used for content moderation tasks. Each enum value represents a specific provider.
- Values:
AZURE: Represents the Azure Content Safety service.
LLAMA_GUARD_3_8B: Represents the Llama Guard 3 based on Llama-3.1-8B pretrained model.
- AZURE = 'azure_content_safety'ΒΆ
- LLAMA_GUARD_3_8B = 'llama_guard_3_8b'ΒΆ
- class gen_ai_hub.orchestration_v2.models.ContentFilter(*, type: ContentFilterProvider, config: AzureContentFilter | LlamaGuard38bFilter | None = None)ΒΆ
Bases:
ABCBaseModelBase class for content filtering configurations.
This class provides a generic structure for defining content filters from various providers. It allows for specifying the provider and associated configuration parameters.
- Parameters:
type β The name of the content filter provider.
config β A dictionary containing the configuration parameters for the content filter.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: ContentFilterProviderΒΆ
- config: AzureContentFilter | LlamaGuard38bFilter | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.LlamaGuard38bFilterConfig(*, type: ContentFilterProvider = ContentFilterProvider.LLAMA_GUARD_3_8B, config: LlamaGuard38bFilter)ΒΆ
Bases:
ContentFilter- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: ContentFilterProviderΒΆ
- config: LlamaGuard38bFilterΒΆ
- class gen_ai_hub.orchestration_v2.models.AzureContentSafetyInputFilterConfig(*, type: ContentFilterProvider = ContentFilterProvider.AZURE, config: AzureContentSafetyInput | None = None)ΒΆ
Bases:
ContentFilter- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: ContentFilterProviderΒΆ
- config: AzureContentSafetyInput | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.AzureContentSafetyOutputFilterConfig(*, type: ContentFilterProvider = ContentFilterProvider.AZURE, config: AzureContentSafetyOutput | None = None)ΒΆ
Bases:
ContentFilter- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: ContentFilterProviderΒΆ
- config: AzureContentSafetyOutput | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.FilteringStreamOptions(*, overlap: Annotated[int | None, Ge(ge=0), Le(le=10000)] = 0)ΒΆ
Bases:
ABCBaseModeloverlap: Number of characters that should be additionally sent to content filtering services from previous chunks as additional context.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- overlap: int | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.InputFiltering(*, filters: Annotated[List[AzureContentSafetyInputFilterConfig | LlamaGuard38bFilterConfig | ContentFilter], MinLen(min_length=1)])ΒΆ
Bases:
ABCBaseModelModule for managing and applying input content filters.
- Parameters:
filters β List of ContentFilter objects to be applied to input content.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- filters: List[AzureContentSafetyInputFilterConfig | LlamaGuard38bFilterConfig | ContentFilter]ΒΆ
- class gen_ai_hub.orchestration_v2.models.OutputFiltering(*, filters: Annotated[List[AzureContentSafetyOutputFilterConfig | LlamaGuard38bFilterConfig | ContentFilter], MinLen(min_length=1)], stream_options: FilteringStreamOptions | None = None)ΒΆ
Bases:
ABCBaseModelModule for managing and applying output content filters.
- Parameters:
filters β List of ContentFilter objects to be applied to output content.
stream_options β Module-specific streaming options.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- filters: List[AzureContentSafetyOutputFilterConfig | LlamaGuard38bFilterConfig | ContentFilter]ΒΆ
- stream_options: FilteringStreamOptions | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.FilteringModuleConfig(*, input: InputFiltering | None = None, output: OutputFiltering | None = None)ΒΆ
Bases:
ABCBaseModelModule for managing and applying content filters.
- Parameters:
input β Module for filtering and validating input content before processing.
output β Module for filtering and validating output content after generation.
- classmethod enforce_min_properties(values)ΒΆ
Ensure at least one of input or output filtering is provided.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- input: InputFiltering | NoneΒΆ
- output: OutputFiltering | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.DataMaskingProviderName(*values)ΒΆ
Bases:
str,EnumEnumerates the available data masking providers.
This enum defines the supported providers for masking sensitive data in the LLM module.
Values: SAP_DATA_PRIVACY_INTEGRATION: Refers to the SAP Data Privacy Integration service, which offers anonymization and pseudonymization capabilities for sensitive data.
- SAP_DATA_PRIVACY_INTEGRATION = 'sap_data_privacy_integration'ΒΆ
- class gen_ai_hub.orchestration_v2.models.MaskingMethod(*values)ΒΆ
Bases:
str,EnumEnumerates the supported masking methods.
This enum defines the two main methods for masking sensitive information: anonymization and pseudonymization. Anonymization irreversibly removes sensitive data, while pseudonymization allows the original data to be recovered.
- Values:
ANONYMIZATION: Irreversibly replaces sensitive data with placeholders (e.g., MASKED_ENTITY).
PSEUDONYMIZATION: Replaces sensitive data with reversible placeholders (e.g., MASKED_ENTITY_ID).
- ANONYMIZATION = 'anonymization'ΒΆ
- PSEUDONYMIZATION = 'pseudonymization'ΒΆ
- class gen_ai_hub.orchestration_v2.models.ProfileEntity(*values)ΒΆ
Bases:
str,EnumEnumerates the entity categories that can be masked by the SAP Data Privacy Integration service.
This enum lists different types of personal or sensitive information (PII) that can be detected and masked by the data masking module, such as personal details, organizational data, contact information, and identifiers.
- Values:
PERSON: Represents personal names.
ORG: Represents organizational names.
UNIVERSITY: Represents educational institutions.
LOCATION: Represents geographical locations.
EMAIL: Represents email addresses.
PHONE: Represents phone numbers.
ADDRESS: Represents physical addresses.
SAP_IDS_INTERNAL: Represents internal SAP identifiers.
SAP_IDS_PUBLIC: Represents public SAP identifiers.
URL: Represents URLs.
USERNAME_PASSWORD: Represents usernames and passwords.
NATIONAL_ID: Represents national identification numbers.
IBAN: Represents International Bank Account Numbers.
SSN: Represents Social Security Numbers.
CREDIT_CARD_NUMBER: Represents credit card numbers.
PASSPORT: Represents passport numbers.
DRIVING_LICENSE: Represents driving license numbers.
NATIONALITY: Represents nationality information.
RELIGIOUS_GROUP: Represents religious group affiliation.
POLITICAL_GROUP: Represents political group affiliation.
PRONOUNS_GENDER: Represents pronouns and gender identity.
GENDER: Represents gender information.
SEXUAL_ORIENTATION: Represents sexual orientation.
TRADE_UNION: Represents trade union membership.
SENSITIVE_DATA: Represents any other sensitive information.
- PERSON = 'profile-person'ΒΆ
- ORG = 'profile-org'ΒΆ
- UNIVERSITY = 'profile-university'ΒΆ
- LOCATION = 'profile-location'ΒΆ
- EMAIL = 'profile-email'ΒΆ
- PHONE = 'profile-phone'ΒΆ
- ADDRESS = 'profile-address'ΒΆ
- SAP_IDS_INTERNAL = 'profile-sapids-internal'ΒΆ
- SAP_IDS_PUBLIC = 'profile-sapids-public'ΒΆ
- URL = 'profile-url'ΒΆ
- USERNAME_PASSWORD = 'profile-username-password'ΒΆ
- NATIONAL_ID = 'profile-nationalid'ΒΆ
- IBAN = 'profile-iban'ΒΆ
- SSN = 'profile-ssn'ΒΆ
- CREDIT_CARD_NUMBER = 'profile-credit-card-number'ΒΆ
- PASSPORT = 'profile-passport'ΒΆ
- DRIVING_LICENSE = 'profile-driverlicense'ΒΆ
- NATIONALITY = 'profile-nationality'ΒΆ
- RELIGIOUS_GROUP = 'profile-religious-group'ΒΆ
- POLITICAL_GROUP = 'profile-political-group'ΒΆ
- PRONOUNS_GENDER = 'profile-pronouns-gender'ΒΆ
- GENDER = 'profile-gender'ΒΆ
- SEXUAL_ORIENTATION = 'profile-sexual-orientation'ΒΆ
- TRADE_UNION = 'profile-trade-union'ΒΆ
- SENSITIVE_DATA = 'profile-sensitive-data'ΒΆ
- ETHNICITY = 'profile-ethnicity'ΒΆ
- class gen_ai_hub.orchestration_v2.models.DPIMethodConstant(*, method: str = 'constant', value: str)ΒΆ
Bases:
ABCBaseModelReplaces the entity with the specified value followed by an incrementing number
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- method: strΒΆ
- value: strΒΆ
- class gen_ai_hub.orchestration_v2.models.DPIMethodFabricatedData(*, method: str = 'fabricated_data')ΒΆ
Bases:
ABCBaseModelReplaces the entity with a randomly generated value appropriate to its type.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- method: strΒΆ
- class gen_ai_hub.orchestration_v2.models.DPICustomEntity(*, regex: str, replacement_strategy: DPIMethodConstant)ΒΆ
Bases:
ABCBaseModelregex: Regular expression to match the entity replacement_strategy: Replacement strategy to be used for the entity
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- regex: strΒΆ
- replacement_strategy: DPIMethodConstantΒΆ
- class gen_ai_hub.orchestration_v2.models.DPIStandardEntity(*, type: ProfileEntity, replacement_strategy: DPIMethodConstant | DPIMethodFabricatedData | None = None)ΒΆ
Bases:
ABCBaseModeltype: Standard entity type to be masked replacement_strategy: Replacement strategy to be used for the entity
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: ProfileEntityΒΆ
- replacement_strategy: DPIMethodConstant | DPIMethodFabricatedData | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.MaskGroundingInput(*, enabled: bool = False)ΒΆ
Bases:
ABCBaseModelControls whether the input to the grounding module will be masked with the configuration supplied in the masking module
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- enabled: boolΒΆ
- class gen_ai_hub.orchestration_v2.models.MaskingProviderConfig(*, type: DataMaskingProviderName = DataMaskingProviderName.SAP_DATA_PRIVACY_INTEGRATION, method: MaskingMethod, entities: List[DPIStandardEntity | DPICustomEntity], allowlist: List[str] | None = None, mask_grounding_input: MaskGroundingInput | None = None)ΒΆ
Bases:
ABCBaseModelSAP Data Privacy Integration provider for data masking.
This class implements the SAP Data Privacy Integration service, which can anonymize or pseudonymize specified entity categories in the input data. It supports masking sensitive information like personal names, contact details, and identifiers.
- Parameters:
method β The method of masking to apply (anonymization or pseudonymization).
entities β A list of entity categories to be masked, such as names, locations, or emails.
allowlist β A list of strings that should not be masked.
mask_grounding_input β A flag indicating whether to mask input to the grounding module.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: DataMaskingProviderNameΒΆ
- method: MaskingMethodΒΆ
- entities: List[DPIStandardEntity | DPICustomEntity]ΒΆ
- allowlist: List[str] | NoneΒΆ
- mask_grounding_input: MaskGroundingInput | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.MaskingModuleConfig(*, providers: Annotated[List[MaskingProviderConfig] | None, MinLen(min_length=1)] = None, masking_providers: Annotated[List[MaskingProviderConfig] | None, MinLen(min_length=1)] = None)ΒΆ
Bases:
ABCBaseModelConfiguration for the data masking module.
- Parameters:
providers β list of masking service provider configurations
masking_providers β list of masking provider configurations
IMPORTANT: use exactly one of the parameters to set the list of masking provider configurations. DEPRECATED: parameter βmasking_providersβ will be removed Sept 15, 2026. Use βprovidersβ instead.
- enforce_exactly_one_provider_list()ΒΆ
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- providers: List[MaskingProviderConfig] | NoneΒΆ
- masking_providers: List[MaskingProviderConfig] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.GroundingType(*values)ΒΆ
Bases:
str,EnumEnumerates supported grounding types.
- DOCUMENT_GROUNDING_SERVICE = 'document_grounding_service'ΒΆ
- class gen_ai_hub.orchestration_v2.models.DataRepositoryType(*values)ΒΆ
Bases:
str,EnumEnumerates data repository types.
- VECTOR = 'vector'ΒΆ
- URL = 'help.sap.com'ΒΆ
- class gen_ai_hub.orchestration_v2.models.DocumentGroundingFilter(*, id: str | None = None, data_repository_type: DataRepositoryType | Literal['vector', 'help.sap.com'], search_config: GroundingSearchConfig | None = None, data_repositories: List[str] | None = None, data_repository_metadata: List[KeyValueListPair] | None = None, document_metadata: List[DocumentMetadataKeyValueListPairs] | None = None, chunk_metadata: List[KeyValueListPair] | None = None)ΒΆ
Bases:
ABCBaseModelModule for configuring document grounding filters.
- Parameters:
id β The unique identifier for the grounding filter.
search_config β GroundingSearchConfig object.
data_repository_type β Only include DataRepositories with the given type: vector, help.sap.com.
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.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: str | NoneΒΆ
- data_repository_type: DataRepositoryType | Literal['vector', 'help.sap.com']ΒΆ
- search_config: GroundingSearchConfig | NoneΒΆ
- data_repositories: List[str] | NoneΒΆ
- data_repository_metadata: List[KeyValueListPair] | NoneΒΆ
- document_metadata: List[DocumentMetadataKeyValueListPairs] | NoneΒΆ
- chunk_metadata: List[KeyValueListPair] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.DocumentGroundingPlaceholders(*, input: Annotated[List[str], MinLen(min_length=1)], output: str)ΒΆ
Bases:
ABCBaseModelinput: The list of input parameters used for grounding input questions (minItems: 1). output: Parameter name used for grounding output.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- input: List[str]ΒΆ
- output: strΒΆ
- class gen_ai_hub.orchestration_v2.models.DocumentGroundingConfig(*, filters: List[DocumentGroundingFilter] | None = None, placeholders: DocumentGroundingPlaceholders, metadata_params: list[str] | None = None)ΒΆ
Bases:
ABCBaseModeldefines the detailed configuration for the Grounding module.
- Parameters:
filters β List of DocumentGroundingFilter objects.
placeholders β Placeholders to be used for grounding input questions and output.
metadata_params β Parameter name used for specifying metadata parameters.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- filters: List[DocumentGroundingFilter] | NoneΒΆ
- placeholders: DocumentGroundingPlaceholdersΒΆ
- metadata_params: list[str] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.GroundingModuleConfig(*, type: GroundingType = GroundingType.DOCUMENT_GROUNDING_SERVICE, config: DocumentGroundingConfig)ΒΆ
Bases:
ABCBaseModelModule for managing and applying grounding aka RAG configurations.
- Parameters:
type β The type of the grounding module.
config β Configuration dictionary for the grounding module.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type: GroundingTypeΒΆ
- config: DocumentGroundingConfigΒΆ
- class gen_ai_hub.orchestration_v2.models.KeyValueListPair(*, key: str, value: List[str])ΒΆ
Bases:
ABCBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- key: strΒΆ
- value: List[str]ΒΆ
- class gen_ai_hub.orchestration_v2.models.DocumentMetadataKeyValueListPairs(*, key: str, value: List[str], select_mode: List[Literal['ignoreIfKeyAbsent']] | None = None)ΒΆ
Bases:
KeyValueListPairRestrict documents considered during search to those annotated with the given metadata.
- Parameters:
key β The key for the metadata.
value β The list of values for the metadata.
select_mode β Select mode for search filters.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- select_mode: List[Literal['ignoreIfKeyAbsent']] | NoneΒΆ
- key: strΒΆ
- value: List[str]ΒΆ
- class gen_ai_hub.orchestration_v2.models.GroundingSearchConfig(*, max_chunk_count: Annotated[int | None, Gt(gt=0)] = None, max_document_count: Annotated[int | None, Gt(gt=0)] = None)ΒΆ
Bases:
ABCBaseModelSearch configuration for the data repository.
- Parameters:
max_chunk_count(int β 0, exclusiveMinimum: true): Maximum number of chunks to be returned.
minimum β 0, exclusiveMinimum: true): Maximum number of chunks to be returned.
'maxDocumentCount'. (Cannot be used with)
max_document_count(int β 0, exclusiveMinimum: true): [Only supports βvectorβ dataRepositoryType]
minimum β 0, exclusiveMinimum: true): [Only supports βvectorβ dataRepositoryType]
'maxChunkCount'. (- Maximum number of documents to be returned. Cannot be used with)
given (If maxDocumentCount is)
returned. (then only one chunk per document is)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- validate_max_chunk_count_and_max_document_count()ΒΆ
- max_chunk_count: int | NoneΒΆ
- max_document_count: int | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsEncodingFormat(*values)ΒΆ
Bases:
str,EnumEncoding format for the embeddings output.
- Values:
FLOAT: Returns embeddings as an array of floats. BASE64: Returns embeddings as a base64 encoded string. BINARY: Returns embeddings in binary format.
- FLOAT = 'float'ΒΆ
- BASE64 = 'base64'ΒΆ
- BINARY = 'binary'ΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsInputType(*values)ΒΆ
Bases:
str,EnumType hint for the embedding model about the purpose of the text.
Some models use asymmetric embeddings for better search performance.
- Values:
TEXT: General purpose text (default). DOCUMENT: Content to be searched/retrieved. QUERY: Short search queries.
- TEXT = 'text'ΒΆ
- DOCUMENT = 'document'ΒΆ
- QUERY = 'query'ΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsModelParams(*, dimensions: int | None = None, encoding_format: EmbeddingsEncodingFormat | None = None, normalize: bool | None = None)ΒΆ
Bases:
ABCBaseModelAdditional parameters for generating embeddings.
- Parameters:
dimensions β The number of dimensions for the output embeddings.
encoding_format β The format for the embeddings output (float, base64, or binary).
normalize β Whether to normalize the embeddings.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- dimensions: int | NoneΒΆ
- encoding_format: EmbeddingsEncodingFormat | NoneΒΆ
- normalize: bool | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsModelDetails(*, name: str, version: str | None = 'latest', params: EmbeddingsModelParams | None = None, timeout: Annotated[int | None, Ge(ge=1), Le(le=600)] = 600, max_retries: Annotated[int | None, Ge(ge=0), Le(le=5)] = 2)ΒΆ
Bases:
ABCBaseModelThe model and parameters to be used for generating embeddings.
- Parameters:
name β Name of the embedding model.
version β Version of the model to be used. Defaults to βlatestβ.
params β Additional parameters for the model (dimensions, encoding_format, normalize).
timeout β Timeout for the embeddings request in seconds. Ignored for Vertex AI models.
max_retries β Maximum number of retries. Ignored for Vertex AI models.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: strΒΆ
- version: str | NoneΒΆ
- params: EmbeddingsModelParams | NoneΒΆ
- timeout: int | NoneΒΆ
- max_retries: int | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsModelConfig(*, model: EmbeddingsModelDetails)ΒΆ
Bases:
ABCBaseModelConfiguration for the embeddings model.
- Parameters:
model β The embedding model details.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model: EmbeddingsModelDetailsΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsModuleConfigs(*, embeddings: EmbeddingsModelConfig, masking: MaskingModuleConfig | None = None)ΒΆ
Bases:
ABCBaseModelModule configurations for the embeddings endpoint.
- Parameters:
embeddings β Required configuration for the embeddings model.
masking β Optional configuration for data masking before embedding.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- embeddings: EmbeddingsModelConfigΒΆ
- masking: MaskingModuleConfig | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsOrchestrationConfig(*, modules: EmbeddingsModuleConfigs)ΒΆ
Bases:
ABCBaseModelConfiguration for the Embeddings Orchestration endpoint.
- Parameters:
modules β The module configurations including embeddings model and optional masking.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- modules: EmbeddingsModuleConfigsΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsInput(*, text: str | List[str], type: EmbeddingsInputType | None = None)ΒΆ
Bases:
ABCBaseModelInput for the embeddings endpoint.
- Parameters:
text β The text to embed. Can be a single string or a list of strings.
type β Optional type hint for the embedding model (text, document, or query).
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- text: str | List[str]ΒΆ
- type_: EmbeddingsInputType | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsUsage(*, prompt_tokens: int, total_tokens: int)ΒΆ
Bases:
ABCBaseModelToken usage information for the embeddings request.
- Parameters:
prompt_tokens β The number of tokens used by the prompt.
total_tokens β The total number of tokens used by the request.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- prompt_tokens: intΒΆ
- total_tokens: intΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingResult(*, object: str = 'embedding', embedding: List[float] | str, index: int)ΒΆ
Bases:
ABCBaseModelA single embedding result.
- Parameters:
object β The object type, always βembeddingβ.
embedding β The embedding vector (array of floats) or base64 string.
index β The index of this embedding in the list.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- object: strΒΆ
- embedding: List[float] | strΒΆ
- index: intΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsResponse(*, object: str = 'list', data: List[EmbeddingResult], model: str, usage: EmbeddingsUsage)ΒΆ
Bases:
ABCBaseModelThe response from the embedding model, following OpenAI specification.
- Parameters:
object β The object type, always βlistβ.
data β The list of embeddings generated by the model.
model β The name of the model used to generate the embeddings.
usage β Token usage information.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- object: strΒΆ
- data: List[EmbeddingResult]ΒΆ
- model: strΒΆ
- usage: EmbeddingsUsageΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsPostResponse(*, request_id: str, intermediate_results: Dict | None = None, final_result: EmbeddingsResponse)ΒΆ
Bases:
ABCBaseModelResponse for an embeddings POST request.
- Parameters:
request_id β Unique identifier for the request.
intermediate_results β Optional results from intermediate modules (e.g., masking).
final_result β The embeddings response from the model.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- request_id: strΒΆ
- intermediate_results: Dict | NoneΒΆ
- final_result: EmbeddingsResponseΒΆ
- class gen_ai_hub.orchestration_v2.models.EmbeddingsRequest(*, config: EmbeddingsOrchestrationConfig, input: EmbeddingsInput)ΒΆ
Bases:
ABCBaseModelRequest body for the embeddings endpoint.
- Parameters:
config β The embeddings orchestration configuration.
input β The input text to embed.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- config: EmbeddingsOrchestrationConfigΒΆ
- input: EmbeddingsInputΒΆ
- class gen_ai_hub.orchestration_v2.models.LlamaGuard38bFilter(*, violent_crimes: bool = False, non_violent_crimes: bool = False, sex_crimes: bool = False, child_exploitation: bool = False, defamation: bool = False, specialized_advice: bool = False, privacy: bool = False, intellectual_property: bool = False, indiscriminate_weapons: bool = False, hate: bool = False, self_harm: bool = False, sexual_content: bool = False, elections: bool = False, code_interpreter_abuse: bool = False)ΒΆ
Bases:
ABCBaseModelSpecific implementation of ContentFilter for Llama Guard 3. Llama Guard 3 is a Llama-3.1-8B pretrained model, fine-tuned for content safety classification.
- Parameters:
violent_crimes β Responses that enable, encourage, or endorse the commission of violent crimes.
non_violent_crimes β Responses that enable, encourage, or endorse the commission of non-violent crimes.
sex_crimes β Responses that enable, encourage, or endorse the commission of sex-related crimes.
child_exploitation β Responses that contain, describe, enable or endorse the sexual abuse of children.
defamation β Responses that are both verifiably false and likely to injure a living personβs reputation.
specialized_advice β Responses that contain specialized financial, medical or legal advice.
privacy β Responses that contain sensitive or nonpublic personal information.
intellectual_property β Responses that may violate the intellectual property rights of any third party.
indiscriminate_weapons β Responses that enable, encourage, or endorse the creation of indiscriminate weapons.
hate β Responses that demean or dehumanize people on the basis of their sensitive, personal characteristics.
self_harm β Responses that enable, encourage, or endorse acts of intentional self-harm.
sexual_content β Responses that contain erotica.
elections β Responses that contain factually incorrect information about electoral systems and processes.
code_interpreter_abuse β Responses that seek to abuse code interpreters.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- violent_crimes: boolΒΆ
- non_violent_crimes: boolΒΆ
- sex_crimes: boolΒΆ
- child_exploitation: boolΒΆ
- defamation: boolΒΆ
- specialized_advice: boolΒΆ
- privacy: boolΒΆ
- intellectual_property: boolΒΆ
- indiscriminate_weapons: boolΒΆ
- hate: boolΒΆ
- self_harm: boolΒΆ
- sexual_content: boolΒΆ
- elections: boolΒΆ
- code_interpreter_abuse: boolΒΆ
- class gen_ai_hub.orchestration_v2.models.LLMModelDetails(*, name: str, version: str | None = 'latest', params: Dict | None = None, timeout: Annotated[int | None, Ge(ge=1), Le(le=600)] = 600, max_retries: Annotated[int | None, Ge(ge=0), Le(le=5)] = 2)ΒΆ
Bases:
ABCBaseModelThe model and parameters to be used for the prompt templating. This is the model that will be used to generate the response.
- Parameters:
name β Name of the model as in LLM Access configuration.
version β Version of the model to be used. Defaults to βlatestβ.
params β Additional parameters for the model. Default values are used for mandatory parameters.
timeout β Timeout for the LLM request in seconds. This parameter is currently ignored for Vertex AI models.
max_retries β Maximum number of retries for the LLM request. This parameter is currently ignored for Vertex AI models.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: strΒΆ
- version: str | NoneΒΆ
- params: Dict | NoneΒΆ
- timeout: int | NoneΒΆ
- max_retries: int | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.SystemMessage(*, role: Role = Role.SYSTEM, content: str | List[TextPart])ΒΆ
Bases:
ABCBaseModelRepresents a system message in a prompt or conversation template.
System messages typically provide context or instructions to the AI model.
- Parameters:
role β The role of the entity sending the message.
content β The text content of the system message.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class gen_ai_hub.orchestration_v2.models.UserMessage(*, role: Role = Role.USER, content: str | TextPart | ImagePart | List[str | TextPart | ImagePart | ImageItem])ΒΆ
Bases:
ABCBaseModelRepresents a user message in a prompt or conversation template.
User messages typically contain queries or inputs from the user.
- Parameters:
role β The role of the entity sending the message.
content β The message content, which may be plain text or a sequence of text and images.
- classmethod content_validation(content)ΒΆ
Validates and maps the content field to the appropriate types.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class gen_ai_hub.orchestration_v2.models.AssistantMessage(*, role: Role = Role.ASSISTANT, content: str | List[TextPart] | None = None, refusal: str | None = None, tool_calls: List[MessageToolCall] | None = None)ΒΆ
Bases:
ABCBaseModelRepresents an assistant message in a prompt or conversation template.
Assistant messages typically contain responses or outputs from the AI model.
- Parameters:
role β The role of the entity sending the message.
content β The text content of the assistant message.
refusal β A string indicating refusal reason.
tool_calls β A list of tool call objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- refusal: str | NoneΒΆ
- tool_calls: List[MessageToolCall] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.ToolChatMessage(*, role: Role = Role.TOOL, tool_call_id: str, content: str | List[TextPart])ΒΆ
Bases:
ABCBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- tool_call_id: strΒΆ
- class gen_ai_hub.orchestration_v2.models.DeveloperChatMessage(*, role: Role = Role.DEVELOPER, content: str | List[TextPart])ΒΆ
Bases:
ABCBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class gen_ai_hub.orchestration_v2.models.ResponseChatMessage(*, role: Role = Role.ASSISTANT, content: str, refusal: str | None = None, tool_calls: List[MessageToolCall] | None = None)ΒΆ
Bases:
ABCBaseModelRepresents a response message in a conversation.
- Parameters:
role β The role of the entity sending the message.
content β The text content of the assistant message.
refusal β A string indicating refusal reason.
tool_calls β A list of tool call objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- content: strΒΆ
- refusal: str | NoneΒΆ
- tool_calls: List[MessageToolCall] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.FunctionCall(*, name: str, arguments: str)ΒΆ
Bases:
ABCBaseModelRepresents a function call with its name and arguments.
- nameΒΆ
str The name of the function to call.
- Type:
str
- argumentsΒΆ
str The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
- Type:
str
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- parse_arguments() dictΒΆ
Parses the arguments string as JSON.
- Returns:
A dictionary representing the parsed arguments.
- Return type:
dict
- name: strΒΆ
- arguments: strΒΆ
- class gen_ai_hub.orchestration_v2.models.MessageToolCall(*, id: str, type: Literal['function'] = 'function', function: FunctionCall)ΒΆ
Bases:
ABCBaseModelThe tool calls generated by the model, such as function calls.
- idΒΆ
The ID of the tool call.
- Type:
str
- typeΒΆ
The type of the tool. Currently, only function is supported.
- Type:
Literal[βfunctionβ]
- functionΒΆ
The function that the model called.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: strΒΆ
- type: Literal['function']ΒΆ
- function: FunctionCallΒΆ
- class gen_ai_hub.orchestration_v2.models.ImageDetailLevel(*values)ΒΆ
Bases:
EnumControls the resolution and detail level for image analysis.
- AUTOΒΆ
The model determines the detail level automatically.
- LOWΒΆ
The model uses a low-fidelity, faster version of the image.
- HIGHΒΆ
The model uses a high-fidelity version of the image.
- AUTO = 'auto'ΒΆ
- LOW = 'low'ΒΆ
- HIGH = 'high'ΒΆ
- class gen_ai_hub.orchestration_v2.models.TextPart(*, text: str, type: Literal['text'] = 'text')ΒΆ
Bases:
ABCBaseModelRepresents a text segment within a multimodal content block.
- Parameters:
text β The string content of the text part.
type β The type identifier, defaulting to βtextβ.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- text: strΒΆ
- type_: Literal['text']ΒΆ
- class gen_ai_hub.orchestration_v2.models.ImageUrl(*, url: str, detail: ImageDetailLevel | None = None)ΒΆ
Bases:
ABCBaseModelA data structure holding the URL and detail level for an image.
- Parameters:
url β The location of the image, as a standard or data URL.
detail β The processing detail level for the image.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- url: strΒΆ
- detail: ImageDetailLevel | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.ImagePart(*, image_url: ImageUrl, type: Literal['image_url'] = 'image_url')ΒΆ
Bases:
ABCBaseModelRepresents an image segment within a multimodal content block.
- Parameters:
image_url β An ImageUrl object containing the imageβs location and detail level.
type β The type identifier, defaulting to βimage_urlβ.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: Literal['image_url']ΒΆ
- class gen_ai_hub.orchestration_v2.models.ImageItem(*, url: str | None = None, detail: ImageDetailLevel | None = None)ΒΆ
Bases:
ABCBaseModelRepresents an image for use in multimodal messages.
- Parameters:
url β
The image location, specified as either a standard URL or a data URL. - Standard URL example: βhttps://example.com/image.pngβ
Data URL example: βdata:image/png;base64,β¦β
detail β The image detail level for model processing.
Example
# Using a standard URL img1 = ImageItem(url=βhttps://example.com/image.pngβ, detail=ImageDetailLevel.HIGH)
# Using a data URL img2 = ImageItem(url=βdata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAβ¦β)
- static from_file(file_path: str, mime_type: str | None = None, detail: ImageDetailLevel | None = None) ImageItemΒΆ
Create an ImageItem from a local image file.
- Parameters:
file_path (str) β Path to the image file.
mime_type (Optional[str], optional) β Explicit MIME type (e.g., βimage/pngβ). If not provided, the MIME type will be guessed from the file extension.
detail (Optional[ImageDetailLevel], optional) β The image detail level for model processing.
- Raises:
ValueError β If the MIME type cannot be determined and is not provided.
- Returns:
An ImageItem instance with the image data as a data URL.
- Return type:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_dump(*, mode: Literal['json', 'python'] | str = 'python', include: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, exclude: set[int] | set[str] | Mapping[int, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | Mapping[str, set[int] | set[str] | Mapping[int, IncEx | bool] | Mapping[str, IncEx | bool] | bool] | None = None, context: Any | None = None, by_alias: bool = True, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, round_trip: bool = False, warnings: bool | Literal['none', 'warn', 'error'] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False) dict[str, Any]ΒΆ
Dumps the model to a dictionary with default settings.
- url: str | NoneΒΆ
- detail: ImageDetailLevel | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.PromptTokensDetails(*, audio_tokens: int | None = None, cached_tokens: int | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelRepresents the details of prompt tokens used in a specific operation.
- audio_tokensΒΆ
Audio input tokens present in the prompt.
- Type:
Optional[int]
- cached_tokensΒΆ
Cached tokens present in the prompt.
- Type:
Optional[int]
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- audio_tokens: int | NoneΒΆ
- cached_tokens: int | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.CompletionTokensDetails(*, accepted_prediction_tokens: int | None = None, audio_tokens: int | None = None, reasoning_tokens: int | None = None, rejected_prediction_tokens: int | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelBreakdown of tokens used in a completion.
- accepted_prediction_tokensΒΆ
When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion.
- Type:
Optional[int]
- audio_tokensΒΆ
Audio input tokens generated by the model.
- Type:
Optional[int]
- reasoning_tokensΒΆ
Tokens generated by the model for reasoning.
- Type:
Optional[int]
- rejected_prediction_tokensΒΆ
When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits.
- Type:
Optional[int]
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- accepted_prediction_tokens: int | NoneΒΆ
- audio_tokens: int | NoneΒΆ
- reasoning_tokens: int | NoneΒΆ
- rejected_prediction_tokens: int | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.TokenUsage(*, completion_tokens: int, prompt_tokens: int, total_tokens: int, prompt_tokens_details: PromptTokensDetails | None = None, completion_tokens_details: CompletionTokensDetails | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelUsage of tokens in the response
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- completion_tokens: intΒΆ
- prompt_tokens: intΒΆ
- total_tokens: intΒΆ
- prompt_tokens_details: PromptTokensDetails | NoneΒΆ
- completion_tokens_details: CompletionTokensDetails | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.GenericModuleResult(*, message: str, data: Any | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelGeneric module result :param message: Some message created from the module. Example: Input to LLM is masked successfully. :param data: Additional data object from the module
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- message: strΒΆ
- data: Any | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.TopLogprob(*, token: str, logprob: float, bytes: List[int] | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelRepresents one of the most likely tokens and its log probability at a given token position.
- tokenΒΆ
The token.
- Type:
str
- logprobΒΆ
The log probability of this token.
- Type:
float
- bytesΒΆ
UTF-8 bytes of the token, if applicable.
- Type:
List[int] | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- token: strΒΆ
- logprob: floatΒΆ
- bytes: List[int] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.ChatCompletionTokenLogprob(*, token: str, logprob: float, bytes: List[int] | None = None, top_logprobs: List[TopLogprob] | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelRepresents a token in the message content along with its log probability and alternative top log probabilities.
- tokenΒΆ
The token.
- Type:
str
- logprobΒΆ
The log probability of this token.
- Type:
float
- bytesΒΆ
UTF-8 bytes of the token, if applicable.
- Type:
List[int] | None
- top_logprobsΒΆ
List of most likely tokens and their log probabilities at this token position.
- Type:
List[gen_ai_hub.orchestration_v2.models.response.TopLogprob] | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- token: strΒΆ
- logprob: floatΒΆ
- bytes: List[int] | NoneΒΆ
- top_logprobs: List[TopLogprob] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.ChoiceLogprobs(*, content: List[ChatCompletionTokenLogprob] | None = None, refusal: List[ChatCompletionTokenLogprob] | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelLog probabilities for the choice.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- content: List[ChatCompletionTokenLogprob] | NoneΒΆ
- refusal: List[ChatCompletionTokenLogprob] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.LLMChoice(*, index: int, message: ResponseChatMessage, logprobs: ChoiceLogprobs | None = None, finish_reason: str, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModel- Parameters:
index β Index of the choice
message β Message from the LLM
logprobs β Log probabilities for the choice
finish_reason β
Reason the model stopped generating tokens. - βstopβ if the model hit a natural stop point or a provided stop sequence,
βlengthβ if the maximum token number was reached,
- βcontent_filterβ if content was omitted due to a filter enforced by the LLM model provider
or the content filtering module
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- index: intΒΆ
- message: ResponseChatMessageΒΆ
- logprobs: ChoiceLogprobs | NoneΒΆ
- finish_reason: strΒΆ
- class gen_ai_hub.orchestration_v2.models.StreamFunctionObject(*, name: str | None = None, arguments: str | None = None, **extra_data: Any)ΒΆ
Bases:
FunctionCallRepresents a function call with its name and arguments.
- nameΒΆ
str The name of the function to call.
- Type:
str | None
- argumentsΒΆ
str The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
- Type:
str | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str | NoneΒΆ
- arguments: str | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.StreamToolCall(*, type: Literal['function'] = 'function', index: int, id: str | None = None, function: StreamFunctionObject | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: Literal['function']ΒΆ
- index: intΒΆ
- id: str | NoneΒΆ
- function: StreamFunctionObject | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.StreamDelta(*, role: str | None = None, content: str, tool_calls: List[StreamToolCall] | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- role: str | NoneΒΆ
- content: strΒΆ
- tool_calls: List[StreamToolCall] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.StreamLLMChoice(*, index: int, delta: StreamDelta, logprobs: ChoiceLogprobs | None = None, finish_reason: str | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- index: intΒΆ
- delta: StreamDeltaΒΆ
- logprobs: ChoiceLogprobs | NoneΒΆ
- finish_reason: str | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.Citation(*, ref_id: int | None = None, title: str, url: str, start_index: int | None = None, end_index: int | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelRepresents a citation with related metadata.
- ref_idΒΆ
Unique identifier for inline citation
- Type:
Optional[int]
- titleΒΆ
The title of the citation.
- Type:
str
- urlΒΆ
The URL of the citation.
- Type:
str
- start_indexΒΆ
The starting index position of the citation in a referenced text.
- Type:
Optional[int]
- end_indexΒΆ
The ending index position of the citation in a referenced text.
- Type:
Optional[int]
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- ref_id: int | NoneΒΆ
- title: strΒΆ
- url: strΒΆ
- start_index: int | NoneΒΆ
- end_index: int | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.LLMModuleResult(*, id: str, object: str, created: int, model: str, system_fingerprint: str | None = None, choices: List[LLMChoice], usage: TokenUsage, citations: list[Citation] | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelOutput from LLM. Follows the OpenAI spec.
- idΒΆ
Unique identifier for the response.
- Type:
str
- objectΒΆ
Type of object returned (e.g., βchat.completionβ).
- Type:
str
- createdΒΆ
Unix timestamp of when the result was created.
- Type:
int
- modelΒΆ
The model name (e.g., βgpt-4o-miniβ).
- Type:
str
- system_fingerprintΒΆ
Optional system fingerprint associated with the result.
- Type:
str | None
- choicesΒΆ
List of LLMChoice objects representing the output choices.
- usageΒΆ
TokenUsage object representing the token usage statistics.
- citationsΒΆ
Optional list of citations associated with the response.
- Type:
list[gen_ai_hub.orchestration_v2.models.response.Citation] | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: strΒΆ
- object: strΒΆ
- created: intΒΆ
- model: strΒΆ
- system_fingerprint: str | NoneΒΆ
- usage: TokenUsageΒΆ
- class gen_ai_hub.orchestration_v2.models.StreamLLMModuleResult(*, id: str, object: str, created: int, model: str, system_fingerprint: str | None = None, choices: List[StreamLLMChoice], usage: TokenUsage | None = None, citations: list[Citation] | None = None, **extra_data: Any)ΒΆ
Bases:
LLMModuleResult- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- choices: List[StreamLLMChoice]ΒΆ
- usage: TokenUsage | NoneΒΆ
- id: strΒΆ
- object: strΒΆ
- created: intΒΆ
- model: strΒΆ
- system_fingerprint: str | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.ModuleResults(*, grounding: GenericModuleResult | None = None, templating: List[SystemMessage | UserMessage | AssistantMessage | ToolChatMessage | DeveloperChatMessage | ResponseChatMessage] | None = None, input_translation: GenericModuleResult | None = None, input_masking: GenericModuleResult | None = None, input_filtering: GenericModuleResult | None = None, output_filtering: GenericModuleResult | None = None, output_translation: GenericModuleResult | None = None, llm: LLMModuleResult | None = None, output_unmasking: List[LLMChoice] | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelRepresents the results of each module used in a processing pipeline.
- groundingΒΆ
Optional result from the grounding module.
- templatingΒΆ
Optional list of chat messages resulting from the templating module.
- Type:
List[gen_ai_hub.orchestration_v2.models.message.SystemMessage | gen_ai_hub.orchestration_v2.models.message.UserMessage | gen_ai_hub.orchestration_v2.models.message.AssistantMessage | gen_ai_hub.orchestration_v2.models.message.ToolChatMessage | gen_ai_hub.orchestration_v2.models.message.DeveloperChatMessage | gen_ai_hub.orchestration_v2.models.message.ResponseChatMessage] | None
- input_translationΒΆ
Optional result from the input translation module.
- input_maskingΒΆ
Optional result from the input masking module.
- input_filteringΒΆ
Optional result from the input filtering module.
- output_filteringΒΆ
Optional result from the output filtering module.
- output_translationΒΆ
Optional result from the output translation module.
- llmΒΆ
Optional result from an LLM-specific module.
- output_unmaskingΒΆ
Optional list of choices from the output unmasking module.
- Type:
List[gen_ai_hub.orchestration_v2.models.response.LLMChoice] | None
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- grounding: GenericModuleResult | NoneΒΆ
- templating: List[SystemMessage | UserMessage | AssistantMessage | ToolChatMessage | DeveloperChatMessage | ResponseChatMessage] | NoneΒΆ
- input_translation: GenericModuleResult | NoneΒΆ
- input_masking: GenericModuleResult | NoneΒΆ
- input_filtering: GenericModuleResult | NoneΒΆ
- output_filtering: GenericModuleResult | NoneΒΆ
- output_translation: GenericModuleResult | NoneΒΆ
- llm: LLMModuleResult | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.StreamModuleResults(*, grounding: GenericModuleResult | None = None, templating: List[SystemMessage | UserMessage | AssistantMessage | ToolChatMessage | DeveloperChatMessage | ResponseChatMessage] | None = None, input_translation: GenericModuleResult | None = None, input_masking: GenericModuleResult | None = None, input_filtering: GenericModuleResult | None = None, output_filtering: GenericModuleResult | None = None, output_translation: GenericModuleResult | None = None, llm: StreamLLMModuleResult | None = None, output_unmasking: List[StreamLLMChoice] | None = None, **extra_data: Any)ΒΆ
Bases:
ModuleResults- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- llm: StreamLLMModuleResult | NoneΒΆ
- output_unmasking: List[StreamLLMChoice] | NoneΒΆ
- grounding: GenericModuleResult | NoneΒΆ
- templating: List[ChatMessage] | NoneΒΆ
- input_translation: GenericModuleResult | NoneΒΆ
- input_masking: GenericModuleResult | NoneΒΆ
- input_filtering: GenericModuleResult | NoneΒΆ
- output_filtering: GenericModuleResult | NoneΒΆ
- output_translation: GenericModuleResult | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.SAPAPIError(*, request_id: str, code: int, message: str, location: str, intermediate_results: ModuleResults | None = None, headers: dict[str, str] | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelRepresents an error returned from an SAP API.
- request_idΒΆ
The unique identifier of the request associated with the error.
- Type:
str
- codeΒΆ
The http error code.
- Type:
int
- messageΒΆ
A detailed message describing the error.
- Type:
str
- locationΒΆ
The location where the error occurred
- Type:
str
- intermediate_resultsΒΆ
Optional attribute to store any processing results if available or applicable.
- Type:
Optional[ModuleResults]
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- request_id: strΒΆ
- code: intΒΆ
- message: strΒΆ
- location: strΒΆ
- intermediate_results: ModuleResults | NoneΒΆ
- headers: dict[str, str] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.SAPAPIErrorStreaming(*, request_id: str, code: int, message: str, location: str, intermediate_results: ModuleResultsStreaming | None = None, headers: dict[str, str] | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelRepresents an error returned from an SAP API.
- request_idΒΆ
The unique identifier of the request associated with the error.
- Type:
str
- codeΒΆ
The http error code.
- Type:
int
- messageΒΆ
A detailed message describing the error.
- Type:
str
- locationΒΆ
The location where the error occurred
- Type:
str
- intermediate_resultsΒΆ
Optional attribute to store any processing results if available or applicable.
- Type:
Optional[ModuleResults]
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- request_id: strΒΆ
- code: intΒΆ
- message: strΒΆ
- location: strΒΆ
- intermediate_results: ModuleResultsStreaming | NoneΒΆ
- headers: dict[str, str] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.CompletionPostResponse(*, request_id: str, intermediate_results: ModuleResults, final_result: LLMModuleResult, intermediate_failures: List[SAPAPIError] | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModelRepresents the response for a completion post request.
- request_idΒΆ
Unique identifier for the completion request.
- Type:
str
- intermediate_resultsΒΆ
Results from various modules executed during the processing.
- Type:
- final_resultΒΆ
Output from LLM. Follows the OpenAI spec.
- Type:
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- request_id: strΒΆ
- intermediate_results: ModuleResultsΒΆ
- final_result: LLMModuleResultΒΆ
- intermediate_failures: List[SAPAPIError] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.StreamCompletionPostResponse(*, request_id: str, intermediate_results: StreamModuleResults | None, final_result: StreamLLMModuleResult | None, intermediate_failures: List[SAPAPIError] | None = None, **extra_data: Any)ΒΆ
Bases:
ResponseBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- request_id: strΒΆ
- intermediate_results: StreamModuleResults | NoneΒΆ
- final_result: StreamLLMModuleResult | NoneΒΆ
- intermediate_failures: List[SAPAPIError] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.ErrorResponse(*, error: SAPAPIError | list[SAPAPIError], **extra_data: Any)ΒΆ
Bases:
ResponseBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- error: SAPAPIError | list[SAPAPIError]ΒΆ
- class gen_ai_hub.orchestration_v2.models.ErrorResponseStreaming(*, error: SAPAPIErrorStreaming | list[SAPAPIErrorStreaming], **extra_data: Any)ΒΆ
Bases:
ResponseBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- error: SAPAPIErrorStreaming | list[SAPAPIErrorStreaming]ΒΆ
- class gen_ai_hub.orchestration_v2.models.OrchestrationResponseWithRetries(*, request_id: str, intermediate_results: ModuleResults, final_result: LLMModuleResult, intermediate_failures: List[SAPAPIError] | None = None, retries: int = 0, **extra_data: Any)ΒΆ
Bases:
CompletionPostResponseExtended CompletionPostResponse that includes retry count information.
This is returned when using retry-enabled methods like run_with_retries().
- retriesΒΆ
Number of retry attempts that were made to successfully complete this request.
- Type:
int
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- retries: intΒΆ
- request_id: strΒΆ
- intermediate_results: ModuleResultsΒΆ
- final_result: LLMModuleResultΒΆ
- intermediate_failures: List[SAPAPIError] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.ResponseFormatText(*, type: ResponseFormatType = ResponseFormatType.TEXT)ΒΆ
Bases:
ABCBaseModelResponse format that the model output should adhere to.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: ResponseFormatTypeΒΆ
- class gen_ai_hub.orchestration_v2.models.ResponseFormatJsonObject(*, type: ResponseFormatType = ResponseFormatType.JSON_OBJECT)ΒΆ
Bases:
ABCBaseModelResponse format JSON Object that the model output should adhere to.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: ResponseFormatTypeΒΆ
- class gen_ai_hub.orchestration_v2.models.ResponseFormatJsonSchema(*, type: ResponseFormatType = ResponseFormatType.JSON_SCHEMA, json_schema: JSONResponseSchema)ΒΆ
Bases:
ABCBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: ResponseFormatTypeΒΆ
- json_schema: JSONResponseSchemaΒΆ
- class gen_ai_hub.orchestration_v2.models.JSONResponseSchema(*, name: str, description: str | None = None, schema: dict = <factory>, strict: bool = False)ΒΆ
Bases:
ABCBaseModelResponse format JSON Schema that the model output should adhere to.
- Parameters:
name β The name of the response format.
description β A description of what the response format is for.
schema β A schema for the response format described as a JSON Schema object.
strict β Whether to enable strict schema adherence when generating the output.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod validate_name(name)ΒΆ
validates the name of the response format.
- Parameters:
name (str) β the name to validate
- Raises:
ValueError β if the name does not match the required pattern or exceeds the maximum length
- Returns:
the validated name
- Return type:
str
- name: strΒΆ
- description: str | NoneΒΆ
- schema_: dictΒΆ
- strict: boolΒΆ
- class gen_ai_hub.orchestration_v2.models.GlobalStreamOptions(*, enabled: bool | None = False, chunk_size: int | None = 100, delimiters: List[str] | None = None)ΒΆ
Bases:
ABCBaseModelRepresents options for streaming content generation. :param enabled: If true, the response will be streamed back to the client. :type enabled: bool, optional :param chunk_size: Minimum number of characters per chunk that post-LLM modules operate on. :type chunk_size: int, optional :param delimiters: List of delimiters to split the input text into chunks.Please note, :type delimiters: list(str), optional :param this is a required parameter when input_translation_module_config or: :param output_translation_module_config are configured.:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_dump(**kwargs)ΒΆ
Override model_dump to exclude chunk_size and delimiters when enabled is False.
- enabled: bool | NoneΒΆ
- chunk_size: int | NoneΒΆ
- delimiters: List[str] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.Template(*, template: List[SystemMessage | UserMessage | AssistantMessage | ToolChatMessage | DeveloperChatMessage | ResponseChatMessage], defaults: dict | None = None, response_format: ResponseFormatText | ResponseFormatJsonObject | ResponseFormatJsonSchema | None = None, tools: List[dict | FunctionTool] | None = None)ΒΆ
Bases:
ABCBaseModelRepresents a configurable template for generating prompts or conversations.
- Parameters:
template β A list of prompt messages that form the template.
defaults β A dict of default values for template variables.
tools β A list of tool definitions.
response_format β A response format that the model output should adhere to.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- template: List[SystemMessage | UserMessage | AssistantMessage | ToolChatMessage | DeveloperChatMessage | ResponseChatMessage]ΒΆ
- defaults: dict | NoneΒΆ
- response_format: ResponseFormatText | ResponseFormatJsonObject | ResponseFormatJsonSchema | NoneΒΆ
- tools: List[dict | FunctionTool] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.PromptTemplatingModuleConfig(*, prompt: Template | TemplateRef, model: LLMModelDetails)ΒΆ
Bases:
ABCBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- prompt: Template | TemplateRefΒΆ
- model: LLMModelDetailsΒΆ
- class gen_ai_hub.orchestration_v2.models.TemplateRef(*, template_ref: TemplateRefByID | TemplateRefByScenarioNameVersion)ΒΆ
Bases:
ABCBaseModel- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- template_ref: TemplateRefByID | TemplateRefByScenarioNameVersionΒΆ
- class gen_ai_hub.orchestration_v2.models.TemplateRefByID(*, id: str, scope: Literal['resource_group', 'tenant'] | None = 'tenant')ΒΆ
Bases:
ABCBaseModelRepresents a prompt template reference for generating prompts or conversations. :param id: ID of the template in prompt registry :type id: str :param scope: Defines the scope that is searched
for the referenced template. βtenantβ indicates the template is shared across all resource groups within the tenant, while βresource_groupβ indicates the template is only accessible within the specific resource group. Defaults to βtenantβ.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- id: strΒΆ
- scope: Literal['resource_group', 'tenant'] | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.TemplateRefByScenarioNameVersion(*, scenario: str, name: str, version: str, scope: Literal['resource_group', 'tenant'] | None = 'tenant')ΒΆ
Bases:
ABCBaseModelRepresents a prompt template reference for generating prompts or conversations. :param scenario: Scenario name :type scenario: str :param name: Name of template :type name: str :param version: Version of template :type version: str :param scope: Defines the scope that is searched
for the referenced template. βtenantβ indicates the template is shared across all resource groups within the tenant, while βresource_groupβ indicates the template is only accessible within the specific resource group. Defaults to βtenantβ.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- scenario: strΒΆ
- name: strΒΆ
- version: strΒΆ
- scope: Literal['resource_group', 'tenant'] | NoneΒΆ
- gen_ai_hub.orchestration_v2.models.python_type_to_json_type(py_type)ΒΆ
Convert a Python type to a JSON Schema type.
- Parameters:
py_type (any) β the Python type to convert
- Returns:
A dictionary representing the JSON Schema type.
- Return type:
dict
- class gen_ai_hub.orchestration_v2.models.ChatCompletionTool(*, type: Literal['function'] = 'function')ΒΆ
Bases:
ABCBaseModelBase class for all chat completion tools.
- Parameters:
type (Literal["function"]) β The type of the tool. Currently, only function is supported.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: Literal['function']ΒΆ
- class gen_ai_hub.orchestration_v2.models.FunctionObject(*, description: str | None = None, name: str, parameters: dict | None, strict: bool = False, function: Callable | None = None)ΒΆ
Bases:
ABCBaseModelRepresents a function. :param name: The name of the function to be called. Must be a-z, A-Z, 0-9,
or contain underscores and dashes, with a maximum length of 64.
- Parameters:
description (str) β A description of what the function does, used by the model to choose when and how to call the function.
parameters (dict) β The parameters the functions accepts, described as a JSON Schema object. Omitting parameters defines a function with an empty parameter list.
strict (bool, optional) β Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the parameters field. Only a subset of JSON Schema is supported when strict is true. Defaults to False.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- description: str | NoneΒΆ
- name: strΒΆ
- parameters: dict | NoneΒΆ
- strict: boolΒΆ
- function: Callable | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.FunctionTool(*, type: Literal['function'] = 'function', function: FunctionObject)ΒΆ
Bases:
ChatCompletionToolRepresents a function tool for OpenAI-like function calling.
- Parameters:
type (Literal["function"]) β The type of the tool. Currently, only function is supported.
function (FunctionObject) β The function to be called.
- async aexecute(**kwargs: Any) AnyΒΆ
Asynchronously execute the function with the provided arguments.
- execute(**kwargs: Any) AnyΒΆ
Execute the function with the provided arguments.
- static from_function(func: Callable, *, description: str | None = None, strict: bool = False) FunctionToolΒΆ
Create a FunctionTool from a Python function.
- Parameters:
func (Callable) β The function to be converted to a FunctionTool.
description (Optional[str]) β A description of the function. Defaults to the docstring of the function.
strict (bool) β Whether to enable strict schema adherence when generating the function call.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: Literal['function']ΒΆ
- function: FunctionObjectΒΆ
- gen_ai_hub.orchestration_v2.models.function_tool(func: Callable | None = None, *, description: str | None = None, strict: bool = False) Callable[[Callable], FunctionTool] | FunctionToolΒΆ
Decorator that converts a function into a FunctionTool.
- Usage:
@function_tool def my_func(β¦): β¦
@function_tool() def my_func(β¦): β¦
- class gen_ai_hub.orchestration_v2.models.TranslationConfig(*, source_language: str | None = None, target_language: str)ΒΆ
Bases:
ABCBaseModelConfiguration for sap_document_translation translation provider.
- Parameters:
source_language β Language of the text to be translated. Example: de-DE
target_language β Language to which the text should be translated. Example: en-US
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- source_language: str | NoneΒΆ
- target_language: strΒΆ
- class gen_ai_hub.orchestration_v2.models.SAPDocumentTranslation(*, type: TranslationType = TranslationType.SAP_DOCUMENT_TRANSLATION, config: TranslationConfig)ΒΆ
Bases:
ABCBaseModelConfiguration for translation module.
- Parameters:
type β The type of translation module (e.g., βsap_document_translationβ).
config β Configuration object for the translation module.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- type_: TranslationTypeΒΆ
- config: TranslationConfigΒΆ
- class gen_ai_hub.orchestration_v2.models.SAPDocumentTranslationApplyToSelector(*, category: Literal['placeholders', 'template_roles'], items: list[str], source_language: str)ΒΆ
Bases:
ABCBaseModelThis selector allows you to define the scope of translation, such as specific placeholders or messages with specific roles. For example, {βcategoryβ: βplaceholdersβ,
βitemsβ: [βuser_inputβ], βsource_languageβ: βde-DEβ} targets the value of βuser_inputβ in placeholder_values specified in the request payload; and considers the value to be in German.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- category: Literal['placeholders', 'template_roles']ΒΆ
- items: list[str]ΒΆ
- source_language: strΒΆ
- class gen_ai_hub.orchestration_v2.models.InputTranslationConfig(*, source_language: str | None = None, target_language: str, apply_to: list[SAPDocumentTranslationApplyToSelector] | None = None)ΒΆ
Bases:
TranslationConfigConfiguration for input translation.
- Parameters:
source_language β Language of the text to be translated. Example: de-DE
target_language β Language to which the text should be translated. Example: en-US
apply_to β List of selectors that define the scope of translation.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- apply_to: list[SAPDocumentTranslationApplyToSelector] | NoneΒΆ
- source_language: str | NoneΒΆ
- target_language: strΒΆ
- class gen_ai_hub.orchestration_v2.models.OutputTranslationConfig(*, source_language: str | None = None, target_language: str | SAPDocumentTranslationApplyToSelector)ΒΆ
Bases:
TranslationConfig- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- target_language: str | SAPDocumentTranslationApplyToSelectorΒΆ
- source_language: str | NoneΒΆ
- class gen_ai_hub.orchestration_v2.models.SAPDocumentTranslationInput(*, type: TranslationType = TranslationType.SAP_DOCUMENT_TRANSLATION, config: InputTranslationConfig | TranslationConfig, translate_messages_history: bool | None = None)ΒΆ
Bases:
SAPDocumentTranslationConfiguration for input translation
- Parameters:
type β The type of translation module (e.g., βsap_document_translationβ).
translate_messages_history β If true, the messages history will be translated as well.
config β Configuration object for the translation module.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- translate_messages_history: bool | NoneΒΆ
- config: InputTranslationConfig | TranslationConfigΒΆ
- type_: TranslationTypeΒΆ
- class gen_ai_hub.orchestration_v2.models.SAPDocumentTranslationOutput(*, type: TranslationType = TranslationType.SAP_DOCUMENT_TRANSLATION, config: OutputTranslationConfig | TranslationConfig)ΒΆ
Bases:
SAPDocumentTranslationConfiguration for output translation
- Parameters:
type β The type of translation module (e.g., βsap_document_translationβ).
config β Configuration object for the translation module.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- config: OutputTranslationConfig | TranslationConfigΒΆ
- type_: TranslationTypeΒΆ
- class gen_ai_hub.orchestration_v2.models.TranslationModuleConfig(*, input: SAPDocumentTranslationInput | SAPDocumentTranslation | None = None, output: SAPDocumentTranslationOutput | SAPDocumentTranslation | None = None)ΒΆ
Bases:
ABCBaseModelConfiguration for translation module
- Parameters:
input β Configuration for input translation
output β Configuration for output translation
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': False}ΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- input: SAPDocumentTranslationInput | SAPDocumentTranslation | NoneΒΆ
- output: SAPDocumentTranslationOutput | SAPDocumentTranslation | NoneΒΆ
SubmodulesΒΆ
- gen_ai_hub.orchestration_v2.models.azure_content_filter module
- gen_ai_hub.orchestration_v2.models.base module
- gen_ai_hub.orchestration_v2.models.config module
ModuleConfigOrchestrationConfigCompletionRequestConfigurationReferenceByIdConfigRefCompletionRequestConfigurationReferenceByNameScenarioVersionConfigRefCompletionRequestConfigurationReferenceByNameScenarioVersionConfigRef.scenarioCompletionRequestConfigurationReferenceByNameScenarioVersionConfigRef.nameCompletionRequestConfigurationReferenceByNameScenarioVersionConfigRef.versionCompletionRequestConfigurationReferenceByNameScenarioVersionConfigRef.model_config
- gen_ai_hub.orchestration_v2.models.content_filter module
- gen_ai_hub.orchestration_v2.models.content_filtering module
- gen_ai_hub.orchestration_v2.models.data_masking module
DataMaskingProviderNameMaskingMethodProfileEntityProfileEntity.PERSONProfileEntity.ORGProfileEntity.UNIVERSITYProfileEntity.LOCATIONProfileEntity.EMAILProfileEntity.PHONEProfileEntity.ADDRESSProfileEntity.SAP_IDS_INTERNALProfileEntity.SAP_IDS_PUBLICProfileEntity.URLProfileEntity.USERNAME_PASSWORDProfileEntity.NATIONAL_IDProfileEntity.IBANProfileEntity.SSNProfileEntity.CREDIT_CARD_NUMBERProfileEntity.PASSPORTProfileEntity.DRIVING_LICENSEProfileEntity.NATIONALITYProfileEntity.RELIGIOUS_GROUPProfileEntity.POLITICAL_GROUPProfileEntity.PRONOUNS_GENDERProfileEntity.GENDERProfileEntity.SEXUAL_ORIENTATIONProfileEntity.TRADE_UNIONProfileEntity.SENSITIVE_DATAProfileEntity.ETHNICITY
DPIMethodConstantDPIMethodFabricatedDataDPICustomEntityDPIStandardEntityMaskGroundingInputMaskingProviderConfigMaskingModuleConfig
- gen_ai_hub.orchestration_v2.models.document_grounding module
GroundingTypeDataRepositoryTypeDocumentGroundingFilterDocumentGroundingFilter.idDocumentGroundingFilter.data_repository_typeDocumentGroundingFilter.search_configDocumentGroundingFilter.data_repositoriesDocumentGroundingFilter.data_repository_metadataDocumentGroundingFilter.document_metadataDocumentGroundingFilter.chunk_metadataDocumentGroundingFilter.model_config
DocumentGroundingPlaceholdersDocumentGroundingConfigGroundingModuleConfigKeyValueListPairDocumentMetadataKeyValueListPairs
- gen_ai_hub.orchestration_v2.models.embeddings module
- gen_ai_hub.orchestration_v2.models.llama_guard_3_filter module
LlamaGuard38bFilterLlamaGuard38bFilter.violent_crimesLlamaGuard38bFilter.non_violent_crimesLlamaGuard38bFilter.sex_crimesLlamaGuard38bFilter.child_exploitationLlamaGuard38bFilter.defamationLlamaGuard38bFilter.specialized_adviceLlamaGuard38bFilter.privacyLlamaGuard38bFilter.intellectual_propertyLlamaGuard38bFilter.indiscriminate_weaponsLlamaGuard38bFilter.hateLlamaGuard38bFilter.self_harmLlamaGuard38bFilter.sexual_contentLlamaGuard38bFilter.electionsLlamaGuard38bFilter.code_interpreter_abuseLlamaGuard38bFilter.model_config
- gen_ai_hub.orchestration_v2.models.llm_model_details module
- gen_ai_hub.orchestration_v2.models.message module
- gen_ai_hub.orchestration_v2.models.multimodal_items module
- gen_ai_hub.orchestration_v2.models.orchestration_request module
- gen_ai_hub.orchestration_v2.models.response module
PromptTokensDetailsCompletionTokensDetailsCompletionTokensDetails.accepted_prediction_tokensCompletionTokensDetails.audio_tokensCompletionTokensDetails.reasoning_tokensCompletionTokensDetails.rejected_prediction_tokensCompletionTokensDetails.accepted_prediction_tokensCompletionTokensDetails.audio_tokensCompletionTokensDetails.reasoning_tokensCompletionTokensDetails.rejected_prediction_tokensCompletionTokensDetails.model_config
TokenUsageGenericModuleResultTopLogprobChatCompletionTokenLogprobChatCompletionTokenLogprob.tokenChatCompletionTokenLogprob.logprobChatCompletionTokenLogprob.bytesChatCompletionTokenLogprob.top_logprobsChatCompletionTokenLogprob.tokenChatCompletionTokenLogprob.logprobChatCompletionTokenLogprob.bytesChatCompletionTokenLogprob.top_logprobsChatCompletionTokenLogprob.model_config
ChoiceLogprobsLLMChoiceStreamFunctionObjectStreamToolCallStreamDeltaStreamLLMChoiceCitationLLMModuleResultLLMModuleResult.idLLMModuleResult.objectLLMModuleResult.createdLLMModuleResult.modelLLMModuleResult.system_fingerprintLLMModuleResult.choicesLLMModuleResult.usageLLMModuleResult.citationsLLMModuleResult.idLLMModuleResult.objectLLMModuleResult.createdLLMModuleResult.modelLLMModuleResult.system_fingerprintLLMModuleResult.choicesLLMModuleResult.usageLLMModuleResult.citationsLLMModuleResult.model_config
StreamLLMModuleResultModuleResultsModuleResults.groundingModuleResults.templatingModuleResults.input_translationModuleResults.input_maskingModuleResults.input_filteringModuleResults.output_filteringModuleResults.output_translationModuleResults.llmModuleResults.output_unmaskingModuleResults.groundingModuleResults.templatingModuleResults.input_translationModuleResults.input_maskingModuleResults.input_filteringModuleResults.output_filteringModuleResults.output_translationModuleResults.llmModuleResults.output_unmaskingModuleResults.model_config
StreamModuleResultsStreamModuleResults.llmStreamModuleResults.output_unmaskingStreamModuleResults.model_configStreamModuleResults.groundingStreamModuleResults.templatingStreamModuleResults.input_translationStreamModuleResults.input_maskingStreamModuleResults.input_filteringStreamModuleResults.output_filteringStreamModuleResults.output_translation
SAPAPIErrorSAPAPIErrorStreamingSAPAPIErrorStreaming.request_idSAPAPIErrorStreaming.codeSAPAPIErrorStreaming.messageSAPAPIErrorStreaming.locationSAPAPIErrorStreaming.intermediate_resultsSAPAPIErrorStreaming.request_idSAPAPIErrorStreaming.codeSAPAPIErrorStreaming.messageSAPAPIErrorStreaming.locationSAPAPIErrorStreaming.intermediate_resultsSAPAPIErrorStreaming.headersSAPAPIErrorStreaming.model_config
CompletionPostResponseCompletionPostResponse.request_idCompletionPostResponse.intermediate_resultsCompletionPostResponse.final_resultCompletionPostResponse.request_idCompletionPostResponse.intermediate_resultsCompletionPostResponse.final_resultCompletionPostResponse.intermediate_failuresCompletionPostResponse.model_config
StreamCompletionPostResponseErrorResponseErrorResponseStreamingOrchestrationResponseWithRetriesOrchestrationResponseWithRetries.retriesOrchestrationResponseWithRetries.retriesOrchestrationResponseWithRetries.model_configOrchestrationResponseWithRetries.request_idOrchestrationResponseWithRetries.intermediate_resultsOrchestrationResponseWithRetries.final_resultOrchestrationResponseWithRetries.intermediate_failures
- gen_ai_hub.orchestration_v2.models.response_format module
- gen_ai_hub.orchestration_v2.models.streaming module
- gen_ai_hub.orchestration_v2.models.template module
- gen_ai_hub.orchestration_v2.models.template_ref module
- gen_ai_hub.orchestration_v2.models.tools module
- gen_ai_hub.orchestration_v2.models.translation module