Module core.python_engine

TODO: We used to have a version of this that was quite flexible and could allow for others to provide their capabilities and the Python engine could use them. However, we have decided to simplify the Python engine to only use the LLM and Embedding from the context for the moment as the Python Engine we want is a bit complex. We will revisit this in the future to be able to have both: - Capabilities that can be provided by others - State management that can allow a complex agentic workflow

Classes

class PythonEngine (driver: lavague.core.base_driver.BaseDriver, llm: llama_index.core.base.llms.base.BaseLLM = None, embedding: llama_index.core.base.embeddings.base.BaseEmbedding = None, logger: lavague.core.logger.AgentLogger = None, clean_html: Callable[[str], str] = None)

Helper class that provides a standard way to create an ABC using inheritance.

Ancestors

  • lavague.core.base_engine.BaseEngine
  • abc.ABC
  • lavague.core.logger.Loggable
  • lavague.core.display.Display

Class variables

var driver : lavague.core.base_driver.BaseDriver
var embedding : llama_index.core.base.embeddings.base.BaseEmbedding
var llm : llama_index.core.base.llms.base.BaseLLM

Static methods

def from_context(context: lavague.core.context.Context)

Methods

def execute_instruction(self, instruction: str) ‑> lavague.core.base_engine.ActionResult
def set_display(self, display: bool)