Skip to content

Mock

LLMTestServer

Mock server for OpenAI API. This class is used to simulate the OpenAI API for testing purposes.

Source code in python/potato_head/mock/_mock.pyi
class LLMTestServer:
    """
    Mock server for OpenAI API.
    This class is used to simulate the OpenAI API for testing purposes.
    """

    def __init__(self):
        pass

    def __enter__(self):
        """
        Start the mock server.
        """
        pass

    def __exit__(self, exc_type, exc_value, traceback):
        """
        Stop the mock server.
        """
        pass

__enter__()

Start the mock server.

Source code in python/potato_head/mock/_mock.pyi
def __enter__(self):
    """
    Start the mock server.
    """
    pass

__exit__(exc_type, exc_value, traceback)

Stop the mock server.

Source code in python/potato_head/mock/_mock.pyi
def __exit__(self, exc_type, exc_value, traceback):
    """
    Stop the mock server.
    """
    pass