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

 
Classes
       
builtins.str(builtins.object)
Role(builtins.str, enum.Enum)
enum.Enum(builtins.object)
Role(builtins.str, enum.Enum)
gen_ai_hub.orchestration.models.base.JSONSerializable(abc.ABC)
Message
AssistantMessage
SystemMessage
UserMessage

 
class AssistantMessage(Message)
    AssistantMessage(content: str)
 
Represents an assistant message in a prompt or conversation template.
 
Assistant messages typically contain responses or outputs from the AI model.
 
Args:
    content: The text content of the assistant message.
 
 
Method resolution order:
AssistantMessage
Message
gen_ai_hub.orchestration.models.base.JSONSerializable
abc.ABC
builtins.object

Methods defined here:
__init__(self, content: str)
Initialize self.  See help(type(self)) for accurate signature.

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

Methods inherited from Message:
__eq__(self, other)
Return self==value.
__repr__(self)
Return repr(self).
to_dict(self)
Convert the object to a JSON-serializable dictionary.

Data and other attributes inherited from Message:
__dataclass_fields__ = {'content': Field(name='content',type=<class 'str'>,default=...appingproxy({}),kw_only=False,_field_type=_FIELD), 'role': Field(name='role',type=typing.Union[gen_ai_hub.o...appingproxy({}),kw_only=False,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)
__hash__ = None
__match_args__ = ('role', 'content')

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

 
class Message(gen_ai_hub.orchestration.models.base.JSONSerializable)
    Message(role: Union[gen_ai_hub.orchestration.models.message.Rolestr], content: str) -&gt; None
 
Represents a single message in a prompt or conversation template.
 
This base class defines the structure for all types of messages in a prompt,
including content and role.
 
Args:
    role: The role of the entity sending the message.
    content: The text content of the message.
 
 
Method resolution order:
Message
gen_ai_hub.orchestration.models.base.JSONSerializable
abc.ABC
builtins.object

Methods defined here:
__eq__(self, other)
Return self==value.
__init__(self, role: Union[gen_ai_hub.orchestration.models.message.Role, str], content: str) -> None
Initialize self.  See help(type(self)) for accurate signature.
__repr__(self)
Return repr(self).
to_dict(self)
Convert the object to a JSON-serializable dictionary.

Data and other attributes defined here:
__abstractmethods__ = frozenset()
__annotations__ = {'content': <class 'str'>, 'role': typing.Union[gen_ai_hub.orchestration.models.message.Role, str]}
__dataclass_fields__ = {'content': Field(name='content',type=<class 'str'>,default=...appingproxy({}),kw_only=False,_field_type=_FIELD), 'role': Field(name='role',type=typing.Union[gen_ai_hub.o...appingproxy({}),kw_only=False,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)
__hash__ = None
__match_args__ = ('role', 'content')

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

 
class Role(builtins.str, enum.Enum)
    Role(value, names=None, *, module=None, qualname=None, type=None, start=1)
 
Enumerates supported roles in LLM-based conversations.
 
This enum defines the standard roles used in interactions with Large Language Models (LLMs).
These roles are generally used to structure the input and distinguish between different parts of the conversation.
 
Values:
    USER: Represents the human user's input in the conversation.
    SYSTEM: Represents system-level instructions or context setting for the LLM.
    ASSISTANT: Represents the LLM's responses in the conversation.
 
 
Method resolution order:
Role
builtins.str
enum.Enum
builtins.object

Data and other attributes defined here:
ASSISTANT = <Role.ASSISTANT: 'assistant'>
SYSTEM = <Role.SYSTEM: 'system'>
USER = <Role.USER: 'user'>

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

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

 
class SystemMessage(Message)
    SystemMessage(content: str)
 
Represents a system message in a prompt or conversation template.
 
System messages typically provide context or instructions to the AI model.
 
Args:
    content: The text content of the system message.
 
 
Method resolution order:
SystemMessage
Message
gen_ai_hub.orchestration.models.base.JSONSerializable
abc.ABC
builtins.object

Methods defined here:
__init__(self, content: str)
Initialize self.  See help(type(self)) for accurate signature.

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

Methods inherited from Message:
__eq__(self, other)
Return self==value.
__repr__(self)
Return repr(self).
to_dict(self)
Convert the object to a JSON-serializable dictionary.

Data and other attributes inherited from Message:
__dataclass_fields__ = {'content': Field(name='content',type=<class 'str'>,default=...appingproxy({}),kw_only=False,_field_type=_FIELD), 'role': Field(name='role',type=typing.Union[gen_ai_hub.o...appingproxy({}),kw_only=False,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)
__hash__ = None
__match_args__ = ('role', 'content')

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

 
class UserMessage(Message)
    UserMessage(content: str)
 
Represents a user message in a prompt or conversation template.
 
User messages typically contain queries or inputs from the user.
 
Args:
    content: The text content of the user message.
 
 
Method resolution order:
UserMessage
Message
gen_ai_hub.orchestration.models.base.JSONSerializable
abc.ABC
builtins.object

Methods defined here:
__init__(self, content: str)
Initialize self.  See help(type(self)) for accurate signature.

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

Methods inherited from Message:
__eq__(self, other)
Return self==value.
__repr__(self)
Return repr(self).
to_dict(self)
Convert the object to a JSON-serializable dictionary.

Data and other attributes inherited from Message:
__dataclass_fields__ = {'content': Field(name='content',type=<class 'str'>,default=...appingproxy({}),kw_only=False,_field_type=_FIELD), 'role': Field(name='role',type=typing.Union[gen_ai_hub.o...appingproxy({}),kw_only=False,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)
__hash__ = None
__match_args__ = ('role', 'content')

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

 
Data
        Union = typing.Union