eta.constants

Global constants used by other Eta modules.

This module contains definitions for a variety of global constants that are used by other Eta modules. Generally, it can be imported using from eta.constants import *.

Module attributes

SLEEPTIME

The time used to sleep between each iteration of Eta's core processes.

REASONING_DEPTH_LIMIT

How many 'inference steps' from a direct observation to take during the reasoning process.

EMBEDDING_DEFAULT_API

Default embedding API URL, used if no other URL is specified in an embedder API.

EMBEDDING_DEFAULT_MODEL

Default embedding model, used if no other model is specified in an embedder.

KEY_PATH

Directory to check for API keys.

SYMTAB_PATH

Path used to create the symbol table (a dict structure maintaining indices for each unique symbol).

COREFERENCE_MODE

The level of coreference to use.

RECENCY_CUTOFF

The coreference module will only look this many turns back in the discourse history to find possible referents.

EXPECTED_STEP_FAILURE_PERIOD_COEFFICIENT

The coefficient to use in the function mapping certainty scores to the period for expected step failures.

CERTAINTY_THRESHOLD

A ULF must have a certainty greater than or equal to this score to be used in a response.

EMOTIONS_LIST

A list of emotions supported by Eta, where the first element is assumed to be the default.

IO_PATH

The path for input/outputs to be written to and read from.

IO_IN_DIR

The directory within the IO path to use for inputs.

IO_OUT_DIR

The directory within the IO path to use for outputs.

IO_CLOG_DIR

The directory within the IO path to use for writing conversation logs for a session.

CLOG_FILES

The list of all supported conversation log files.

LOG_PATH

The path for archived conversation logs to be written to.

GPT_DEBUG_FILE

A filepath to write GPT prompt debugging info to.

DEFAULT_START

The default start schema if none is provided in agent-config.

DEFAULT_IMPORTANCE

The default importance value for new facts stored in memory.

DEFAULT_IMPORTANCE_THRESHOLD

The default threshold to place on importance when retrieving facts from memory.

ME

Indexical variable to be used for Eta.

YOU

Indexical variable to be used for the user.

NOW

Indexical variable to be used for the current time.

HERE

Indexical variable to be used for the current location.

SAY_TO

Predicate for a saying event.

PARAPHRASE_TO

Predicate for a paraphrasing event (i.e., a gist clause attribution).

ARTICULATE_TO

Predicate for an articulation event (i.e., a ULF attribution).

RESPOND_TO

Predicate for a response event.

REPLY_TO

Predicate for a reply event.

ANSWER

Predicate for an answer event.

ASK

Predicate for an ask event.

REACT_TO

Predicate for a react event.

SAY_BYE

Predicate for a saying goodbye event.

STORE_IN_STM

Predicate for storing a fact in short-term memory.

FORGET_FROM_STM

Predicate for forgetting a fact from short-term memory.

SPEECH_ACTS

A list of all supported speech acts.

TELIC_VERBS

A list of all predicates considered "telic", i.e., that denote events that are assumed to be nearly instantaneous.

NOOP_YOU

A formula used to denote a "failed" expectation of a user event.

NOOP_GEN

A formula used to denote a "failed" expectation of an external event.

NOOP

A list of all formulas that are considered to be "no-op" events.

SLEEPTIME = 0.1

The time used to sleep between each iteration of Eta’s core processes.

Type:

float

REASONING_DEPTH_LIMIT = 3

How many ‘inference steps’ from a direct observation to take during the reasoning process.

Type:

int

EMBEDDING_DEFAULT_API = 'https://api-inference.huggingface.co/pipeline/feature-extraction/'

Default embedding API URL, used if no other URL is specified in an embedder API.

Type:

str

EMBEDDING_DEFAULT_MODEL = 'sentence-transformers/all-distilroberta-v1'

Default embedding model, used if no other model is specified in an embedder.

Type:

str

KEY_PATH = '_keys/'

Directory to check for API keys.

Type:

str

SYMTAB_PATH = 'io/symtab.json'

Path used to create the symbol table (a dict structure maintaining indices for each unique symbol).

Type:

str

COREFERENCE_MODE = 1

The level of coreference to use.

Supported values:

0: simply reconstruct the original ULF. 1: the same as level 2, but excluding “I” and “you” from references to resolve. 2: substitute canonical names only for anaphora and indexical NP’s (e.g., “it” or “that block”). 3: substitute canonical names for all references.

Type:

int

RECENCY_CUTOFF = 2

The coreference module will only look this many turns back in the discourse history to find possible referents.

Type:

int

EXPECTED_STEP_FAILURE_PERIOD_COEFFICIENT = 30

The coefficient to use in the function mapping certainty scores to the period for expected step failures.

The certainty of an episode determines the timer period (in seconds) that must be passed for Eta to consider an expected episode failed and move on in the plan. This is a function on the certainty of the episode, with a certainty of 1 having an infinite period, and a certainty of 0 having a period of 0. This constant determines the coefficient on the certainty-to-period function.

A value of “30” makes a certainty of ~0.632 correspond to 30 seconds.

Type:

int

CERTAINTY_THRESHOLD = 0.7

A ULF must have a certainty greater than or equal to this score to be used in a response.

Type:

float

EMOTIONS_LIST = ['neutral', 'sad', 'happy', 'worried', 'angry']

A list of emotions supported by Eta, where the first element is assumed to be the default.

Type:

list[str]

IO_PATH = 'io/'

The path for input/outputs to be written to and read from.

Type:

str

IO_IN_DIR = 'in/'

The directory within the IO path to use for inputs.

Type:

str

IO_OUT_DIR = 'out/'

The directory within the IO path to use for outputs.

Type:

str

IO_CLOG_DIR = 'conversation-log/'

The directory within the IO path to use for writing conversation logs for a session.

Type:

str

CLOG_FILES = ['text', 'affect', 'gist', 'semantic', 'pragmatic', 'obligations', 'step']

The list of all supported conversation log files.

Type:

list[str]

LOG_PATH = 'logs/'

The path for archived conversation logs to be written to.

Type:

str

GPT_DEBUG_FILE = 'debug/prompts.txt'

A filepath to write GPT prompt debugging info to.

Type:

str

DEFAULT_START = 'have-eta-dialog.v'

The default start schema if none is provided in agent-config.

Type:

int

DEFAULT_IMPORTANCE = 0.25

The default importance value for new facts stored in memory.

Type:

float

DEFAULT_IMPORTANCE_THRESHOLD = 0.5

The default threshold to place on importance when retrieving facts from memory.

Type:

float

ME = '^me'

Indexical variable to be used for Eta.

Type:

str

YOU = '^you'

Indexical variable to be used for the user.

Type:

str

NOW = '^now'

Indexical variable to be used for the current time.

Type:

str

HERE = '^here'

Indexical variable to be used for the current location.

Type:

str

SAY_TO = 'say-to.v'

Predicate for a saying event.

Type:

str

PARAPHRASE_TO = 'paraphrase-to.v'

Predicate for a paraphrasing event (i.e., a gist clause attribution).

Type:

str

ARTICULATE_TO = 'articulate-to.v'

Predicate for an articulation event (i.e., a ULF attribution).

Type:

str

RESPOND_TO = 'respond-to.v'

Predicate for a response event.

Type:

str

REPLY_TO = 'reply-to.v'

Predicate for a reply event.

Type:

str

ANSWER = 'answer.v'

Predicate for an answer event.

Type:

str

ASK = 'ask.v'

Predicate for an ask event.

Type:

str

REACT_TO = 'react-to.v'

Predicate for a react event.

Type:

str

SAY_BYE = 'say-bye-to.v'

Predicate for a saying goodbye event.

Type:

str

STORE_IN_STM = 'store-in-stm.v'

Predicate for storing a fact in short-term memory.

Type:

str

FORGET_FROM_STM = 'forget-from-stm.v'

Predicate for forgetting a fact from short-term memory.

Type:

str

SPEECH_ACTS = ['say-to.v', 'paraphrase-to.v', 'respond-to.v', 'reply-to.v', 'answer.v', 'ask.v', 'react-to.v', 'articulate-to.v', 'say-bye-to.v']

A list of all supported speech acts.

Type:

list[str]

TELIC_VERBS = ['say-to.v', 'paraphrase-to.v', 'respond-to.v', 'reply-to.v', 'answer.v', 'ask.v', 'react-to.v', 'articulate-to.v', 'say-bye-to.v', 'move.v']

A list of all predicates considered “telic”, i.e., that denote events that are assumed to be nearly instantaneous.

TODO: ultimately we need to create a more systemic classification, and provide this as an external resource.

Type:

list[str]

NOOP_YOU = ['^you', 'do.v', ['no.d', 'thing.n']]

A formula used to denote a “failed” expectation of a user event.

Type:

s-expr

NOOP_GEN = [['no.d', 'thing.n'], 'happen.v']

A formula used to denote a “failed” expectation of an external event.

Type:

s-expr

NOOP = [['^you', 'do.v', ['no.d', 'thing.n']], [['no.d', 'thing.n'], 'happen.v']]

A list of all formulas that are considered to be “no-op” events.

Type:

list[s-expr]