Skip to content

Nodes

reply(text, data, ADDRESS)

autograms.nodes.reply_suffix

Autograms node wrapper for autograms.functional.reply

Raises a ReplyExit exception to send a direct reply.

  • Parameters:
  • text (str): The reply message to the user.
  • data (dict, optional): optional data to be sent back in autograms return object sent by autogram.apply()
  • ADDRESS (str) Only used by compiler--must be string literal or predefined constant. Used to recover position of function call in the code of an @autograms_function. Allows for GOTO and RETURNTO to jump to location in the code.

  • Raises:

  • ReplyExit: Used to exit the current function and send the reply.

reply_suffix(instruction, data, ADDRESS)

autograms.nodes.reply_suffix

Autograms node wrapper for autograms.functional.reply_suffix

Replies to the user and includes the specified suffix in the response.

  • Parameters:
  • instruction (str): The suffix to be included in the reply.
  • data (dict, optional): optional data to be sent back in autograms return object sent by autogram.apply()
  • ADDRESS (str, optional) Only used by compiler--must be string literal or predefined constant. Used to recover position of function call in the code of an @autograms_function.
  • Raises:
  • ReplyExit: Used to exit the current function and send the reply.

reply_instruction(instruction, data, ADDRESS)

autograms.nodes.reply_instruction

Autograms node wrapper for autograms.functional.reply_instruction Node wrapper for autograms.functional.reply_instruction

Replies based on an instruction generated by the conversational model.

  • Parameters:
  • instruction (str): The instruction to guide the reply.
  • data (dict, optional): optional data to be sent back in autograms return object sent by autogram.apply()
  • ADDRESS (str, optional) Only used by compiler--must be string literal or predefined constant. Used to recover position of function call in the code of an @autograms_function. Allows for GOTO and RETURNTO to jump to location in the code.
  • Raises:
  • ReplyExit: Used to exit the current function and send the reply

thought(instruction, ADDRESS)

autograms.nodes.thought Autograms node wrapper for autograms.functional.thought Generates a thought response that is logged but not displayed to the user.

  • Parameters:
  • instruction (str): Instruction to guide the thought response.
  • ADDRESS (str, optional) Only used by compiler--must be string literal or predefined constant. Used to recover position of function call in the code of an @autograms_function. Allows for GOTO and RETURNTO to jump to location in the code.
  • Returns:
  • str: The generated thought.

silent_thought(instruction, ADDRESS)

autograms.nodes.silent_thought Autograms node wrapper for autograms.functional.silent_thought Generates a thought response without logging it.

  • Parameters:
  • instruction (str): Instruction to guide the thought response.
  • ADDRESS (str, optional) Only used by compiler--must be string literal or predefined constant. Used to recover position of function call in the code of an @autograms_function. Allows for GOTO and RETURNTO to jump to location in the code.
  • Returns:
  • str: The generated thought.

TRANSITION(transition_question, transitions, max_turns=1,ADDRESS=None, **kwargs)

autograms.nodes.TRANSITION

Autograms node wrapper for autograms.functionalTRANSITION Manages a transition based on multiple-choice input.

  • Parameters:
  • transition_question (str): The question prompting the transition.
  • transitions (dict): Maps choices to their corresponding addresses.
  • max_turns (int, optional): Maximum attempts for a valid response.
  • **kwargs: Additional arguments for the model.

  • Raises:

  • GoTo: To jump to the target address.