Class: Twilio::REST::Memory::V1::RecallList::MemoryRetrievalRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/memory/v1/recall.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ MemoryRetrievalRequest

Returns a new instance of MemoryRetrievalRequest.



76
77
78
79
80
81
82
83
84
85
# File 'lib/twilio-ruby/rest/memory/v1/recall.rb', line 76

def initialize(payload)
        @conversation_id = payload["conversation_id"]
        @query = payload["query"]
        @begin_date = payload["begin_date"]
        @end_date = payload["end_date"]
        @communications_limit = payload["communications_limit"]
        @observations_limit = payload["observations_limit"]
        @summaries_limit = payload["summaries_limit"]
        @relevance_threshold = payload["relevance_threshold"]
end

Instance Attribute Details

#begin_dateObject

Parameters:

  • : (conversation_id)
    String

    A unique identifier for the conversation using Twilio Type ID (TTID) format.

  • : (query)
    String

    Hybrid search query for finding relevant memories. Omit to use query expansion to generate query from previous 10 communications in conversation.

  • : (begin_date)
    Time

    Start date for filtering memories (inclusive).

  • : (end_date)
    Time

    End date for filtering memories (exclusive).

  • : (communications_limit)
    String

    Maximum number of conversational session memories to return. If omitted or set to 0, no session memories will be fetched.

  • : (observations_limit)
    String

    Maximum number of observation memories to return. If omitted, defaults to 20. If set to 0, no observation memories will be fetched.

  • : (summaries_limit)
    String

    Maximum number of summary memories to return. If omitted, defaults to 5. If set to 0, no summary memories will be fetched.

  • : (relevance_threshold)
    Float

    Minimum relevance score threshold for observations and summaries to be returned. Only memories with a relevance score greater than or equal to this threshold will be included in the response. This threshold only applies when results are ranked by relevance. When results are returned in most-recent order, this field has no effect.



75
76
77
# File 'lib/twilio-ruby/rest/memory/v1/recall.rb', line 75

def begin_date
  @begin_date
end

#communications_limitObject

Parameters:

  • : (conversation_id)
    String

    A unique identifier for the conversation using Twilio Type ID (TTID) format.

  • : (query)
    String

    Hybrid search query for finding relevant memories. Omit to use query expansion to generate query from previous 10 communications in conversation.

  • : (begin_date)
    Time

    Start date for filtering memories (inclusive).

  • : (end_date)
    Time

    End date for filtering memories (exclusive).

  • : (communications_limit)
    String

    Maximum number of conversational session memories to return. If omitted or set to 0, no session memories will be fetched.

  • : (observations_limit)
    String

    Maximum number of observation memories to return. If omitted, defaults to 20. If set to 0, no observation memories will be fetched.

  • : (summaries_limit)
    String

    Maximum number of summary memories to return. If omitted, defaults to 5. If set to 0, no summary memories will be fetched.

  • : (relevance_threshold)
    Float

    Minimum relevance score threshold for observations and summaries to be returned. Only memories with a relevance score greater than or equal to this threshold will be included in the response. This threshold only applies when results are ranked by relevance. When results are returned in most-recent order, this field has no effect.



75
76
77
# File 'lib/twilio-ruby/rest/memory/v1/recall.rb', line 75

def communications_limit
  @communications_limit
end

#conversation_idObject

Parameters:

  • : (conversation_id)
    String

    A unique identifier for the conversation using Twilio Type ID (TTID) format.

  • : (query)
    String

    Hybrid search query for finding relevant memories. Omit to use query expansion to generate query from previous 10 communications in conversation.

  • : (begin_date)
    Time

    Start date for filtering memories (inclusive).

  • : (end_date)
    Time

    End date for filtering memories (exclusive).

  • : (communications_limit)
    String

    Maximum number of conversational session memories to return. If omitted or set to 0, no session memories will be fetched.

  • : (observations_limit)
    String

    Maximum number of observation memories to return. If omitted, defaults to 20. If set to 0, no observation memories will be fetched.

  • : (summaries_limit)
    String

    Maximum number of summary memories to return. If omitted, defaults to 5. If set to 0, no summary memories will be fetched.

  • : (relevance_threshold)
    Float

    Minimum relevance score threshold for observations and summaries to be returned. Only memories with a relevance score greater than or equal to this threshold will be included in the response. This threshold only applies when results are ranked by relevance. When results are returned in most-recent order, this field has no effect.



75
76
77
# File 'lib/twilio-ruby/rest/memory/v1/recall.rb', line 75

def conversation_id
  @conversation_id
end

#end_dateObject

Parameters:

  • : (conversation_id)
    String

    A unique identifier for the conversation using Twilio Type ID (TTID) format.

  • : (query)
    String

    Hybrid search query for finding relevant memories. Omit to use query expansion to generate query from previous 10 communications in conversation.

  • : (begin_date)
    Time

    Start date for filtering memories (inclusive).

  • : (end_date)
    Time

    End date for filtering memories (exclusive).

  • : (communications_limit)
    String

    Maximum number of conversational session memories to return. If omitted or set to 0, no session memories will be fetched.

  • : (observations_limit)
    String

    Maximum number of observation memories to return. If omitted, defaults to 20. If set to 0, no observation memories will be fetched.

  • : (summaries_limit)
    String

    Maximum number of summary memories to return. If omitted, defaults to 5. If set to 0, no summary memories will be fetched.

  • : (relevance_threshold)
    Float

    Minimum relevance score threshold for observations and summaries to be returned. Only memories with a relevance score greater than or equal to this threshold will be included in the response. This threshold only applies when results are ranked by relevance. When results are returned in most-recent order, this field has no effect.



75
76
77
# File 'lib/twilio-ruby/rest/memory/v1/recall.rb', line 75

def end_date
  @end_date
end

#observations_limitObject

Parameters:

  • : (conversation_id)
    String

    A unique identifier for the conversation using Twilio Type ID (TTID) format.

  • : (query)
    String

    Hybrid search query for finding relevant memories. Omit to use query expansion to generate query from previous 10 communications in conversation.

  • : (begin_date)
    Time

    Start date for filtering memories (inclusive).

  • : (end_date)
    Time

    End date for filtering memories (exclusive).

  • : (communications_limit)
    String

    Maximum number of conversational session memories to return. If omitted or set to 0, no session memories will be fetched.

  • : (observations_limit)
    String

    Maximum number of observation memories to return. If omitted, defaults to 20. If set to 0, no observation memories will be fetched.

  • : (summaries_limit)
    String

    Maximum number of summary memories to return. If omitted, defaults to 5. If set to 0, no summary memories will be fetched.

  • : (relevance_threshold)
    Float

    Minimum relevance score threshold for observations and summaries to be returned. Only memories with a relevance score greater than or equal to this threshold will be included in the response. This threshold only applies when results are ranked by relevance. When results are returned in most-recent order, this field has no effect.



75
76
77
# File 'lib/twilio-ruby/rest/memory/v1/recall.rb', line 75

def observations_limit
  @observations_limit
end

#queryObject

Parameters:

  • : (conversation_id)
    String

    A unique identifier for the conversation using Twilio Type ID (TTID) format.

  • : (query)
    String

    Hybrid search query for finding relevant memories. Omit to use query expansion to generate query from previous 10 communications in conversation.

  • : (begin_date)
    Time

    Start date for filtering memories (inclusive).

  • : (end_date)
    Time

    End date for filtering memories (exclusive).

  • : (communications_limit)
    String

    Maximum number of conversational session memories to return. If omitted or set to 0, no session memories will be fetched.

  • : (observations_limit)
    String

    Maximum number of observation memories to return. If omitted, defaults to 20. If set to 0, no observation memories will be fetched.

  • : (summaries_limit)
    String

    Maximum number of summary memories to return. If omitted, defaults to 5. If set to 0, no summary memories will be fetched.

  • : (relevance_threshold)
    Float

    Minimum relevance score threshold for observations and summaries to be returned. Only memories with a relevance score greater than or equal to this threshold will be included in the response. This threshold only applies when results are ranked by relevance. When results are returned in most-recent order, this field has no effect.



75
76
77
# File 'lib/twilio-ruby/rest/memory/v1/recall.rb', line 75

def query
  @query
end

#relevance_thresholdObject

Parameters:

  • : (conversation_id)
    String

    A unique identifier for the conversation using Twilio Type ID (TTID) format.

  • : (query)
    String

    Hybrid search query for finding relevant memories. Omit to use query expansion to generate query from previous 10 communications in conversation.

  • : (begin_date)
    Time

    Start date for filtering memories (inclusive).

  • : (end_date)
    Time

    End date for filtering memories (exclusive).

  • : (communications_limit)
    String

    Maximum number of conversational session memories to return. If omitted or set to 0, no session memories will be fetched.

  • : (observations_limit)
    String

    Maximum number of observation memories to return. If omitted, defaults to 20. If set to 0, no observation memories will be fetched.

  • : (summaries_limit)
    String

    Maximum number of summary memories to return. If omitted, defaults to 5. If set to 0, no summary memories will be fetched.

  • : (relevance_threshold)
    Float

    Minimum relevance score threshold for observations and summaries to be returned. Only memories with a relevance score greater than or equal to this threshold will be included in the response. This threshold only applies when results are ranked by relevance. When results are returned in most-recent order, this field has no effect.



75
76
77
# File 'lib/twilio-ruby/rest/memory/v1/recall.rb', line 75

def relevance_threshold
  @relevance_threshold
end

#summaries_limitObject

Parameters:

  • : (conversation_id)
    String

    A unique identifier for the conversation using Twilio Type ID (TTID) format.

  • : (query)
    String

    Hybrid search query for finding relevant memories. Omit to use query expansion to generate query from previous 10 communications in conversation.

  • : (begin_date)
    Time

    Start date for filtering memories (inclusive).

  • : (end_date)
    Time

    End date for filtering memories (exclusive).

  • : (communications_limit)
    String

    Maximum number of conversational session memories to return. If omitted or set to 0, no session memories will be fetched.

  • : (observations_limit)
    String

    Maximum number of observation memories to return. If omitted, defaults to 20. If set to 0, no observation memories will be fetched.

  • : (summaries_limit)
    String

    Maximum number of summary memories to return. If omitted, defaults to 5. If set to 0, no summary memories will be fetched.

  • : (relevance_threshold)
    Float

    Minimum relevance score threshold for observations and summaries to be returned. Only memories with a relevance score greater than or equal to this threshold will be included in the response. This threshold only applies when results are ranked by relevance. When results are returned in most-recent order, this field has no effect.



75
76
77
# File 'lib/twilio-ruby/rest/memory/v1/recall.rb', line 75

def summaries_limit
  @summaries_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/twilio-ruby/rest/memory/v1/recall.rb', line 86

def to_json(options = {})
{
        "conversationId": @conversation_id,
        "query": @query,
        "beginDate": @begin_date,
        "endDate": @end_date,
        "communicationsLimit": @communications_limit,
        "observationsLimit": @observations_limit,
        "summariesLimit": @summaries_limit,
        "relevanceThreshold": @relevance_threshold,
}.to_json(options)
end