From d027392934633e25380a5b63a03156f3e43b2f6f Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 15 Jun 2023 04:26:45 +0000 Subject: [PATCH] Update schema for latest release --- schema/latest/pipelines-schema.json | 18 ++++++++++++++++++ schema/latest/schema.json | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/schema/latest/pipelines-schema.json b/schema/latest/pipelines-schema.json index 1ab03c15..875c804a 100644 --- a/schema/latest/pipelines-schema.json +++ b/schema/latest/pipelines-schema.json @@ -677,6 +677,9 @@ "maxTokens": { "type": "integer" }, + "minTokens": { + "type": "integer" + }, "queryTemplate": { "type": "string" }, @@ -1874,6 +1877,9 @@ "maxTokens": { "type": "integer" }, + "minTokens": { + "type": "integer" + }, "queryTemplate": { "type": "string" }, @@ -2816,6 +2822,9 @@ "maxTokens": { "type": "integer" }, + "minTokens": { + "type": "integer" + }, "queryTemplate": { "type": "string" }, @@ -3758,6 +3767,9 @@ "maxTokens": { "type": "integer" }, + "minTokens": { + "type": "integer" + }, "queryTemplate": { "type": "string" }, @@ -4700,6 +4712,9 @@ "maxTokens": { "type": "integer" }, + "minTokens": { + "type": "integer" + }, "queryTemplate": { "type": "string" }, @@ -5642,6 +5657,9 @@ "maxTokens": { "type": "integer" }, + "minTokens": { + "type": "integer" + }, "queryTemplate": { "type": "string" }, diff --git a/schema/latest/schema.json b/schema/latest/schema.json index 4b553806..0884b462 100644 --- a/schema/latest/schema.json +++ b/schema/latest/schema.json @@ -97,7 +97,7 @@ "additionalProperties": false, "description": "Configuration for the AnswerAI part of the query. This will only be considered if 'enableAI' is set to 'true'", "engine": "opensearch", - "markdownDescription": "This field adds support for passing various details for the AIAnswer functionality. There are multiple fields accepted in this object. Following is an example body:\n\n```json\n{\n 'docTemplate': '${source.title} is ${source.overview} with url ${source.backdrop_path}',\n 'queryTemplate': 'Can you tell me about ${value}'\n}\n```\n\nThe fields supported by the AIConfig object are: \n\n- **docTemplate**: Template to use for building the message sent to ChatGPT for every hit of the response. The `docTemplate` string supports dynamic values using the special syntax `${}`. These values are resolved while the ChatGPT request body is built. It supports keys that are present in the `_source` field in the response hits. As an example, `source.title` will resolve to `_source.title`. If values are not found, defaults to an empty string. \n- **queryTemplate**: Template to use for building the message that is sent to ChatGPT as the final question. Defaults to `Can you tell me about ${value}` where `value` is the `query.value`. The querytemplate string supports a dynamic value of `value` which is the query.value of the query. \n- **topDocsForContext**: Number of docs to use to build the context. Defaults to 3. This has an upper limit as the total number of hits returned. \n- **systemPrompt**: The system prompt to send as the first message to ChatGPT. Defaults to `You are a helpful assistant`.\n- **maxTokens**: The maximum tokens that can be used for the output. Deafults to being dynamically calculated. Accepts a value between [1, 8000]. \n- **temperature**: A control for randomness, a lower value implies a more deterministic output. Defaults to 1, valid values are between [0, 2].", + "markdownDescription": "This field adds support for passing various details for the AIAnswer functionality. There are multiple fields accepted in this object. Following is an example body:\n\n```json\n{\n 'docTemplate': '${source.title} is ${source.overview} with url ${source.backdrop_path}',\n 'queryTemplate': 'Can you tell me about ${value}'\n}\n```\n\nThe fields supported by the AIConfig object are: \n\n- **docTemplate**: Template to use for building the message sent to ChatGPT for every hit of the response. The `docTemplate` string supports dynamic values using the special syntax `${}`. These values are resolved while the ChatGPT request body is built. It supports keys that are present in the `_source` field in the response hits. As an example, `source.title` will resolve to `_source.title`. If values are not found, defaults to an empty string. \n- **queryTemplate**: Template to use for building the message that is sent to ChatGPT as the final question. Defaults to `Can you tell me about ${value}` where `value` is the `query.value`. The querytemplate string supports a dynamic value of `value` which is the query.value of the query. \n- **topDocsForContext**: Number of docs to use to build the context. Defaults to 3. This has an upper limit as the total number of hits returned. \n- **systemPrompt**: The system prompt to send as the first message to ChatGPT. Defaults to `You are a helpful assistant`.\n- **maxTokens**: The maximum tokens that can be used for the output. Defaults to 300. Accepts a value between [1, 2048]. \n- **minTokens**: Minimum number of tokens to generate in the response. Whenever possible, max tokens is respected, however when the input context + max tokens combined exceed the model limit, the min tokens value is used to calibrate for an optimum output token. Defaults to 100. \n- **temperature**: A control for randomness, a lower value implies a more deterministic output. Defaults to 1, valid values are between [0, 2].", "properties": { "docTemplate": { "type": "string" @@ -105,6 +105,9 @@ "maxTokens": { "type": "integer" }, + "minTokens": { + "type": "integer" + }, "queryTemplate": { "type": "string" },