class documentation
        
        class TestModel(Model): (source)
Constructors: TestModel.returning_responses(responses), TestModel(fn)
Test model for use mocking model responses.
Warning
This API is experimental and may change in the future.
| Static Method | returning | Create a mock model which sequentially returns responses from a list. | 
| Method | __init__ | Initialize a test model with a callable. | 
| Async Method | get | Get a response from the mocked model, by calling the callable passed to the constructor. | 
| Method | stream | Get a streamed response from the model. Unimplemented. | 
| Class Variable | __test__ | Undocumented | 
| Instance Variable | fn | Undocumented | 
Create a mock model which sequentially returns responses from a list.
Warning
This API is experimental and may change in the future.
Initialize a test model with a callable.
Warning
This API is experimental and may change in the future.
    
    
    async def get_response(self, system_instructions: 
  str | None, input: str | list[, model_settings: ModelSettings, tools: list[, output_schema: AgentOutputSchemaBase | None, handoffs: list[, tracing: ModelTracing, **kwargs) -> ModelResponse:
    
      
      (source)
    
    
      
      
      ¶
    
  Get a response from the mocked model, by calling the callable passed to the constructor.
    
    
    def stream_response(self, system_instructions: 
  str | None, input: str | list[, model_settings: ModelSettings, tools: list[, output_schema: AgentOutputSchemaBase | None, handoffs: list[, tracing: ModelTracing, **kwargs) -> AsyncIterator[:
    
      
      (source)
    
    
      
      
      ¶
    
  Get a streamed response from the model. Unimplemented.