Represents a chat message in the Google Vertex AI chat model.

Hierarchy

  • GoogleVertexAIChatMessage

Constructors

Properties

content: string
name?: string

Methods

  • Extracts the role of a generic message and maps it to a Google Vertex AI chat author.

    Parameters

    • message: ChatMessage

      The chat message to extract the role from.

    Returns GoogleVertexAIChatAuthor

    The role of the message mapped to a Google Vertex AI chat author.

  • Creates a new Google Vertex AI chat message from a base message.

    Parameters

    • message: BaseMessage

      The base message to convert.

    • model: string

      The model to use for conversion.

    Returns GoogleVertexAIChatMessage

    A new Google Vertex AI chat message.

  • Maps a message type to a Google Vertex AI chat author.

    Parameters

    • message: BaseMessage

      The message to map.

    • model: string

      The model to use for mapping.

    Returns GoogleVertexAIChatAuthor

    The message type mapped to a Google Vertex AI chat author.

Generated using TypeDoc