Skip to content

Commit 43e592d

Browse files
Update schema for latest release
1 parent 7e599fc commit 43e592d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

schema/latest/pipelines-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@
382382
"type": "string"
383383
},
384384
"queryTemplate": {
385-
"description": "(optional) Template for the query that is passed to ChatGPT as the question. Supports special character 'value' that refers to the 'value' field passed in the query object. Eg: 'Answer the following: ${value}'",
385+
"description": "(optional) Template for the query that is passed to ChatGPT as the question. Supports special character 'value' that refers to the 'value' field passed in the query object, e.g. Answer the query: '${value}'. Think step-by-step, cite the source after the answer and ensure the source is from the provided context.",
386386
"title": "Query Template",
387387
"type": "string"
388388
},

schema/latest/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"additionalProperties": false,
9696
"description": "Configuration for the AnswerAI part of the query. This will only be considered if 'enableAI' is set to 'true'",
9797
"engine": "opensearch",
98-
"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: ```json { 'docTemplate': '${source.title} is ${source.overview} with url ${source.backdrop_path}', 'queryTemplate': 'Can you tell me about ${value}', } ``` The fields supported by the AIConfig object are: - **docTemplate**: Template to use for building the message sent to ChatGPT for every hit of the response - **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`. - **topDocsForContext**: Number of docs to use to build the context. This has an upper limit of the total number of hits returned. - **systemPrompt**: The system prompt to send as the first message to ChatGPT. Defaults to `You are a helpful assistant` - **maxTokens**: Value of `max_tokens` to be passed in the ChatGPT request body. - **temperature**: Value of `temperature` to be passed in the ChatGPT request body. #### Dynamic values in `docTemplate` 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. #### Dynamic values in `queryTemplate` The querytemplate string supports a dynamic value of `value` which is the query.value of the query.",
98+
"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 ```json { 'docTemplate': '${source.title} is ${source.overview} with url ${source.backdrop_path}', 'queryTemplate': 'Can you tell me about ${value}', } ``` \n\n The fields supported by the AIConfig object are: \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` - **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]. \n",
9999
"properties": {
100100
"docTemplate": {
101101
"type": "string"

0 commit comments

Comments
 (0)