class_docstr: Base class for a person on a chat serivce that can act in a ParlAI world.
class_docstr_tok: ["Base","class","for","a","person","on","a","chat","serivce","that","can","act","in","a","ParlAI","world","."]
docstr: Setter for ChatServiceAgent.data.
  
  The data within a ChatServiceAgent is persistent, in the sense that keys
  _cannot_ be removed from the data. This is important to ensure persistence
  of agent state across various parts of the ChatService pipeline.
  
  To ensure this property, we call `agent._data.update(value)` when explicitly
  setting the `data` property of an agent. This protects against cases where,
  e.g., the `__init__` function sets a property for the agent, and then
  later someone manually sets `agent.data = new_data`.
docstr_tok: ["Setter","for","ChatServiceAgent.data",".","The","data","within","a","ChatServiceAgent","is","persistent",",","in","the","sense","that","keys","_cannot_","be","removed","from","the","data",".","This","is","important","to","ensure","persistence","of","agent","state","across","various","parts","of","the","ChatService","pipeline",".","To","ensure","this","property",",","we","call","`","agent._data.update","(","value",")","`","when","explicitly","setting","the","`","data","`","property","of","an","agent",".","This","protects","against","cases","where",",","e.g.",",","the","`","__init__","`","function","sets","a","property","for","the","agent",",","and","then","later","someone","manually","sets","`","agent.data","=","new_data","`","."]
code: def data(self, value):
      """
      Setter for ChatServiceAgent.data.
  
      The data within a ChatServiceAgent is persistent, in the sense that keys
      _cannot_ be removed from the data. This is important to ensure persistence
      of agent state across various parts of the ChatService pipeline.
  
      To ensure this property, we call `agent._data.update(value)` when explicitly
      setting the `data` property of an agent. This protects against cases where,
      e.g., the `__init__` function sets a property for the agent, and then
      later someone manually sets `agent.data = new_data`.
      """
      self._data.update(value)
  
file_path: ParlAI/parlai/chat_service/core/agents.py
imports: import time
  from abc import ABC, abstractmethod
  from queue import Queue
  from parlai.core.agents import Agent
label_desc: Use image node_id 3 for calling the ChatServiceAgent obj's underlying member method code with example usage: obj.data(value) without return types