MockPromptExecutor
A mock implementation of PromptExecutor used for testing.
This class simulates an LLM by returning predefined responses based on the input prompt. It supports different types of matching:
Exact matching - Returns a response when the input exactly matches pattern
Partial matching - Returns a response when the input contains a pattern
Conditional matching - Returns a response when the input satisfies condition
Default response - Returns a default response when no other matches are found
It also supports tool calls and can be configured to return specific tool results.
Functions
Executes a prompt with tools and returns a list of responses.
Executes a prompt and returns a flow of string responses.
Processes a given prompt to determine if it adheres to moderation rules and returns a moderation result.