Skip to content

Interface ZIF_LLM_HTTP_CLIENT_WRAPPER

AI Generated documentation.

Overview

The zif_llm_http_client_wrapper interface defines a standardized HTTP client wrapper with the following key methods:

  1. get_client (Class Method):
  2. Creates and returns an HTTP client instance
  3. Takes client and provider configuration as input
  4. Can raise a validation exception

  5. set_header:

  6. Allows setting HTTP headers
  7. Supports overwriting existing headers
  8. Can raise a validation exception

  9. set_url:

  10. Sets the URL for the HTTP endpoint
  11. Prepends the SM59 destination path
  12. Can raise a validation exception

  13. communicate:

  14. Sends a request to the endpoint
  15. Supports session ID and message handling
  16. Returns a structured response
  17. Can raise an HTTP error exception

  18. close_client:

  19. Closes the HTTP client connection

The interface defines a response type with properties like HTTP code, message, response text, and HTTP response object.

Dependencies

  • Custom exception classes:
  • zcx_llm_validation
  • zcx_llm_http_error
  • Configuration types:
  • zllm_clnt_config
  • zllm_providers
  • Standard SAP interfaces like if_http_response