Alex Bäuerle cd58194d2a
docs(docs): start implementing docs website (#1372)
* docs(docs): start implementing docs website

* update video url

* add autogenerated codebase docs for backend

* precommit

* update links

* fix config and video

* gh actions

* rename

* workdirs

* path

* path

* fix doc1

* redo markdown

* docs

* change main folder name

* simplify readme

* add back architecture

* Fix lint errors

* lint

* update poetry lock

---------

Co-authored-by: Jim Su <jimsu@protonmail.com>
2024-04-29 10:00:51 -07:00

1.2 KiB

sidebar_label, title
sidebar_label title
monologue agenthub.monologue_agent.utils.monologue

Monologue Objects

class Monologue()

The monologue is a representation for the agent's internal monologue where it can think. The agent has the capability of using this monologue for whatever it wants.

__init__

def __init__()

Initialize the empty list of thoughts

add_event

def add_event(t: dict)

Adds an event to memory if it is a valid event.

Arguments:

  • t (dict): The thought that we want to add to memory

Raises:

  • AgentEventTypeError: If t is not a dict

get_thoughts

def get_thoughts()

Get the current thoughts of the agent.

Returns:

  • List: The list of thoughts that the agent has.

get_total_length

def get_total_length()

Gives the total number of characters in all thoughts

Returns:

  • Int: Total number of chars in thoughts.

condense

def condense(llm: LLM)

Attempts to condense the monologue by using the llm

Arguments:

  • llm (LLM): llm to be used for summarization

Raises:

  • Exception: the same exception as it got from the llm or processing the response