Engine
Engine in Eclipse
In the Eclipse framework, an Engine
is a component that orchestrates and executes specific processes to perform handlers. It organizes various handler functions and utilizes a given prompt, along with a language model, to activate them. Essentially, the engine manages and triggers these processes to carry out actions based on the instructions it receives.
Parameters
Handler
handler
Implementation of BaseHandler
; its method(s) will be executed based on the given prompts.
LLM Client
llm
Interface for communicating with the Large Language Model (LLM).
Prompt Template
prompt_template
Defines the structure and format of prompts sent to the LLM using PromptTemplate
.
Tools (optional)
tools
List of handler method names (as dictionaries or strings) available for use during interactions. Defaults to None
. If not provided, the engine will retrieve them dynamically using dir(handler)
.
Output Parser (optional)
output_parser
An optional parser to format and process the handler tools' output. Defaults to None
.
Example Usage
In this example, an Engine
instance named walmart_engine
is created with the following components:
Handler:
walmart_ecom_handler
LLM Client:
llm_client
Prompt Template:
prompt_template
Tools: Set to
None
, allowing the engine to dynamically retrieve handler methods.Output Parser: Set to
None
, meaning no specific output parsing is applied.
This setup enables the walmart_engine
to manage and execute e-commerce-related handler functions using the specified language model and prompt structure.
Last updated