class Multiwoven::Integrations::Source::OpenAI::Client

def run_model(connection_config, payload)

def run_model(connection_config, payload)
  response = send_request(
    url: OPEN_AI_URL,
    http_method: HTTP_POST,
    payload: payload,
    headers: auth_headers(connection_config[:api_key]),
    config: connection_config[:config]
  )
  process_response(response)
rescue StandardError => e
  handle_exception(e, { context: "OPEN AI:RUN_MODEL:EXCEPTION", type: "error" })
end