Skip to content

Interface ZIF_LLM_CHAT_REQUEST

AI Generated documentation.

Overview

The zif_llm_chat_request interface defines a comprehensive contract for managing chat requests in an LLM (Large Language Model) interaction framework. It provides methods for:

  1. Message Management:

  2. add_message: Add a single message

  3. add_messages: Add multiple messages
  4. get_messages: Retrieve all messages
  5. clear_messages: Remove all messages

  6. Tool Handling:

  7. add_tool: Add a single tool

  8. add_tools: Add multiple tools
  9. get_tools: Retrieve all tools
  10. clear_tools: Remove all tools
  11. set_tool_choice: Configure tool selection strategy
  12. add_tool_result: Add tool execution results
  13. add_tool_choices: Add tool call details

  14. Structured Output:

  15. set_structured_output: Configure structured output parameters

  16. set_structured_output_active: Toggle structured output

  17. Additional Utilities:

  18. add_choice: Append LLM choice to message list

  19. get_internal_request: Retrieve full request details
  20. options: Access request configuration options

The interface defines three tool choice constants:

  • tool_choice_none
  • tool_choice_auto
  • tool_choice_required

Dependencies

  • zllm_msg: Message type
  • zllm_msgs: Collection of messages
  • zllm_tools: Collection of tools
  • zif_llm_tool: Tool interface
  • zif_llm_options: Options interface
  • zif_llm_so: Structured output interface