Skip to content

Interface ZIF_LLM_CHAT_REQUEST

AI Generated documentation.

Overview

The ZIF_LLM_CHAT_REQUEST interface provides functionality to manage chat interactions with a Language Learning Model (LLM). The interface handles:

  1. Message Management

  2. add_message() - Adds a single message

  3. add_messages() - Adds multiple messages
  4. get_messages() - Retrieves all messages
  5. clear_messages() - Removes all messages

  6. Tool Management

  7. add_tool() - Adds a single tool with optional tool choice

  8. add_tools() - Adds multiple tools with optional tool choice
  9. get_tools() - Retrieves all tools
  10. clear_tools() - Removes all tools
  11. set_tool_choice() - Sets tool choice mode (none/auto/required)
  12. add_tool_result() - Adds tool execution results
  13. add_tool_choices() - Adds tool call information

  14. Structured Output Handling

  15. set_structured_output() - Configures structured output settings

  16. set_structured_output_active() - Enables/disables structured output
  17. add_choice() - Appends LLM choice to message list

  18. Internal Methods

  19. get_internal_request() - Retrieves complete request details

  20. options() - Provides access to options implementation

Dependencies

The interface has the following key dependencies:

  • ZIF_LLM_TOOL - Tool interface
  • ZIF_LLM_OPTIONS - Options interface
  • ZIF_LLM_SO - Structured output interface
  • Custom data types: ZLLM_MSG, ZLLM_MSGS, ZLLM_TOOLS, ZLLM_TOOL_CALLS, ZLLM_CHOICE, ZLLM_REQUEST