gen_ai_hub.prompt_registry.models package

Submodules

gen_ai_hub.prompt_registry.models.orchestration_config module

class OrchestrationConfigDeleteResponse

Bases: BaseModel

Response to a delete orchestration config request.

Args:

message: Response message.

message: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class OrchestrationConfigGetResponse

Bases: BaseModel

Response to a get orchestration config request.

Args:

id: UUID of the config. name: Config name. version: Config version. scenario: Scenario name. creation_timestamp: When the config was created. managed_by: Who manages the config. is_version_head: Whether this is the head version. spec: The orchestration config specification (optional).

model_dump(**kwargs)

Dumps the model to a dictionary with default settings.

creation_timestamp: str | None
id: str | None
is_version_head: bool | None
managed_by: str | None
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | None
resource_group_id: str | None
scenario: str | None
spec: OrchestrationConfig | None
version: str | None
class OrchestrationConfigListResponse

Bases: BaseModel

Response to list orchestration configs request.

Args:

count: Number of configs returned. resources: List of OrchestrationConfigGetResponse objects.

model_dump(**kwargs)

Dumps the model to a dictionary with default settings.

count: int
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

resources: List[OrchestrationConfigGetResponse]
class OrchestrationConfigPostRequest

Bases: BaseModel

Request to create an orchestration config.

Args:

name: The name of the orchestration config. version: The version of the orchestration config. scenario: The scenario of the orchestration config. spec: The orchestration config specification.

model_dump(**kwargs)

Dumps the model to a dictionary with default settings.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
scenario: str
spec: OrchestrationConfig
version: str
class OrchestrationConfigPostResponse

Bases: BaseModel

Response to the orchestration config post request.

Args:

message: Response message. id: UUID of the created/updated config. scenario: The scenario name. name: The config name. version: The config version.

id: str
message: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
scenario: str
version: str

gen_ai_hub.prompt_registry.models.prompt_template module

class PromptTemplate

Bases: BaseModel

Represents a prompt template.

Args:

role: The role of the prompt template.

content: The content of the prompt template.

content: str

The content of the prompt template.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

role: str

The role of the prompt template.

class PromptTemplateDeleteResponse

Bases: BaseModel

Represents a response to a request to delete a prompt template.

Args:

message: The message of the response.

message: str

The message of the response.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class PromptTemplateGetResponse

Bases: BaseModel

Represents a response to a request to get a prompt template.

Args:

id: The ID of the prompt template.

name: The name of the prompt template.

version: The version of the prompt template.

scenario: The scenario of the prompt template.

creation_timestamp: The creation timestamp of the prompt template.

managed_by: The manager of the prompt template.

is_version_head: Whether the version is the head version.

spec: The specification of the prompt template.

creation_timestamp: str | None

The creation timestamp of the prompt template.

id: str

The ID of the prompt template.

is_version_head: bool | None

Whether the version is the head version.

managed_by: str | None

The manager of the prompt template.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str

The name of the prompt template.

scenario: str

The scenario of the prompt template.

spec: PromptTemplateSpec | None

The specification of the prompt template.

version: str

The version of the prompt template.

class PromptTemplateListResponse

Bases: BaseModel

Represents a response to a request to list prompt templates.

Args:

count: The number of prompt templates.

resources: The list of PromptGetResponse objects.

count: int

The number of prompt templates.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

resources: List[PromptTemplateGetResponse]

The list of PromptGetResponse objects.

class PromptTemplatePostRequest

Bases: BaseModel

Represents a request to create a prompt template.

Args:

name: The name of the prompt template.

version: The version of the prompt template.

scenario: The scenario of the prompt template.

spec: The specification of the prompt template.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str

The name of the prompt template.

scenario: str

The scenario of the prompt template.

spec: PromptTemplateSpec

The specification of the prompt template.

version: str

The version of the prompt template.

class PromptTemplatePostResponse

Bases: BaseModel

Represents a response to a request to create a prompt template.

Args:

message: The message of the response.

id: The ID of the prompt template.

scenario: The scenario of the prompt template.

name: The name of the prompt template.

version: The version of the prompt template.

id: str

The ID of the prompt template.

message: str

The message of the response.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str

The name of the prompt template.

scenario: str

The scenario of the prompt template.

version: str

The version of the prompt template.

class PromptTemplateSpec

Bases: BaseModel

Represents a prompt template specification.

Args:

template: The list of prompt templates.

defaults: The default values for the prompt template fields.

additional_fields: Additional fields for the prompt template.

additional_fields: Dict[Any, Any] | None

Additional fields for the prompt template.

defaults: Dict[Any, Any] | None

The default values for the prompt template fields.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

template: List[PromptTemplate]

The list of prompt templates.

class PromptTemplateSubstitutionRequest

Bases: BaseModel

Represents a request to substitute a prompt template.

Args:

input_params: User provided values to replace the placeholders of the prompt template.

input_params: Dict[Any, Any] | None

User provided values to replace the placeholders of the prompt template.

model_config: ClassVar[ConfigDict] = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}

Pydantic configuration to allow population by field name.

class PromptTemplateSubstitutionResponse

Bases: BaseModel

Represents a response to a request to substitute a prompt template.

Args:

parsed_prompt: The parsed prompt.

resource: List of TemplateGetResponse objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

parsed_prompt: List[PromptTemplate]

The parsed prompt.

resource: PromptTemplateGetResponse | None

List of TemplateGetResponse objects.