ark::openai::testing::SimOpenAiService

Defined in header “ark/openai/testing/sim_openai_service.hh”.


Simple service that mocks out some OpenAI HTTP endpoints to make some testing easier.

Methods

  • SimOpenAiService(const ark::comms::NetworkAddress & bind_address)
    Constructor. Contains the address to bind to.

  • ~SimOpenAiService()
    Destructor. Cleans up internal resources.

  • void poll(std::chrono::nanoseconds timeout)
    Polls the service, handling incoming requests.

  • ark::comms::NetworkAddress address()
    Returns the address that the service is currently bound to.

  • void disable_chat_content_responses()
    Called to set if we should send any content back in our responses.

  • void enable_always_send_error()
    Called to set if we should always send error responses back.