Executes a method call to the AI model.
the request object to be sent to the AI model
the response from the AI model
ProtectedinitProtectedresolveExecutes a method call to the AI model.
the request object to be sent to the AI model
the streaming response from the AI model
The Model interface provides a generic API for invoking AI models. It is designed to handle the interaction with various types of AI models by abstracting the process of sending requests and receiving responses. The interface uses Java generics to accommodate different types of requests and responses, enhancing flexibility and adaptability across different AI model implementations.