Context

public struct Context : Codable, Equatable

State information for the conversation. To maintain state, include the context from the previous response.

  • The unique identifier of the conversation.

    Declaration

    Swift

    public var conversationID: String?
  • For internal use only.

    Declaration

    Swift

    public var system: [String : JSON]?
  • Metadata related to the message.

    Declaration

    Swift

    public var metadata: MessageContextMetadata?
  • Additional properties associated with this model.

    Declaration

    Swift

    public var additionalProperties: [String : JSON]
  • Initialize a Context with member variables.

    Declaration

    Swift

    public init(
        conversationID: String? = nil,
        system: [String: JSON]? = nil,
        metadata: MessageContextMetadata? = nil,
        additionalProperties: [String: JSON] = [:]
    )

    Parameters

    conversationID

    The unique identifier of the conversation.

    system

    For internal use only.

    metadata

    Metadata related to the message.

    Return Value

    An initialized Context.

  • Declaration

    Swift

    public init(from decoder: Decoder) throws
  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws