Target
base class, which you can inherit from to create your own custom model implementations.
Target
class and implement the required abstract methods. The base class provides the foundation for both synchronous and asynchronous operations.
ConversationTarget
class. This class extends the base Target
class and adds support for conversation history.
ConversationTarget
class provides both synchronous and asynchronous methods for handling conversations:
respond_conversation()
: Synchronous method for getting responsesasync_respond_conversation()
: Asynchronous method that must be implemented by subclassesTarget
base class handles all the necessary infrastructure, allowing you to focus on implementing the core model logic in the async_respond
method. This makes it easy to evaluate any LLM model, whether it’s a local model, an API-based service, or any other implementation.
Remember that your custom model must implement the async_respond
method, which is the core method responsible for generating responses to input messages. The base class will handle the conversion between synchronous and asynchronous calls automatically.