diff --git a/docs/source/concepts/prompt_target.rst b/docs/source/concepts/prompt_target.rst index b489b0c1..d8f8df91 100644 --- a/docs/source/concepts/prompt_target.rst +++ b/docs/source/concepts/prompt_target.rst @@ -53,29 +53,28 @@ A prompt target configuration includes the following elements: - ``endpoint``: The API endpoint or function that handles the prompt. - ``parameters`` (Optional): A list of parameters to extract from the prompt. +.. _defining_prompt_target_parameters: + Defining Parameters ~~~~~~~~~~~~~~~~~~~ Parameters are the pieces of information that Arch needs to extract from the user's prompt to perform the desired action. -Each parameter can be marked as required or optional. -Here is a full list of parameter attributes that Arch can support: +Each parameter can be marked as required or optional. Here is a full list of parameter attributes that Arch can support: .. table:: :width: 100% - ==================== ============================================================================ + ======================== ============================================================================ **Attribute** **Description** - ==================== ============================================================================ - ``name`` Specifies identifier of parameters - ``type`` Specifies the data type of the parameter. - ``description`` Provides a human-readable explanation of the parameter's purpose. - ``required`` Indicates whether the parameter is mandatory or optional + ======================== ============================================================================ + ``name (req.)`` Specifies name of the parameter. + ``description (req.)`` Provides a human-readable explanation of the parameter's purpose. + ``type (req.)`` Specifies the data type. Supported types include: **int**, **str**, **float**, **bool**, **list**, **set**, **dict**, **tuple** ``default`` Specifies a default value for the parameter if not provided by the user. - ``items`` Used in the context of arrays to define the schema of items within an array. - ``format`` Specifies a format for the parameter value, e.g., date and email - ``enum`` Lists the allowable values for the parameter. - ``minimum`` Defines the minimum acceptable value for numeric parameters. - ``maximum`` Specifies the maximum acceptable value for numeric parameters. - ==================== ============================================================================ + ``format`` Specifies a format for the parameter value. For example: `2019-12-31` for a date value. + ``enum`` Lists of allowable values for the parameter with data type matching the ``type`` attribute. **Usage Example**: ``enum: ["celsius`", "fahrenheit"]`` + ``items`` Specifies the attribute of the elements when type euqals **list**, **set**, **dict**, **tuple**. **Usage Example**: ``items: {"type": "str"}`` + ``required`` Indicates whether the parameter is mandatory or optional. Valid values: **true** or **false** + ======================== ============================================================================ Example Configuration ~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/source/guides/function_calling.rst b/docs/source/guides/function_calling.rst index 036d0e00..072571d2 100644 --- a/docs/source/guides/function_calling.rst +++ b/docs/source/guides/function_calling.rst @@ -118,6 +118,9 @@ Specify the parameters your function needs and how Arch should interpret these. name: api_server path: /weather +.. Note:: + For a complete refernce of attributes that you can configure in a prompt target, see :ref:`here `. + Step 3: Arch Takes Over ~~~~~~~~~~~~~~~~~~~~~~~ Once you have defined the functions and configured the prompt targets, Arch Gateway takes care of the remaining work.