Skip to content

Commit

Permalink
Update schema for latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jun 15, 2023
1 parent 2aa6975 commit d027392
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
18 changes: 18 additions & 0 deletions schema/latest/pipelines-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,9 @@
"maxTokens": {
"type": "integer"
},
"minTokens": {
"type": "integer"
},
"queryTemplate": {
"type": "string"
},
Expand Down Expand Up @@ -1874,6 +1877,9 @@
"maxTokens": {
"type": "integer"
},
"minTokens": {
"type": "integer"
},
"queryTemplate": {
"type": "string"
},
Expand Down Expand Up @@ -2816,6 +2822,9 @@
"maxTokens": {
"type": "integer"
},
"minTokens": {
"type": "integer"
},
"queryTemplate": {
"type": "string"
},
Expand Down Expand Up @@ -3758,6 +3767,9 @@
"maxTokens": {
"type": "integer"
},
"minTokens": {
"type": "integer"
},
"queryTemplate": {
"type": "string"
},
Expand Down Expand Up @@ -4700,6 +4712,9 @@
"maxTokens": {
"type": "integer"
},
"minTokens": {
"type": "integer"
},
"queryTemplate": {
"type": "string"
},
Expand Down Expand Up @@ -5642,6 +5657,9 @@
"maxTokens": {
"type": "integer"
},
"minTokens": {
"type": "integer"
},
"queryTemplate": {
"type": "string"
},
Expand Down
5 changes: 4 additions & 1 deletion schema/latest/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,17 @@
"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"
},
"maxTokens": {
"type": "integer"
},
"minTokens": {
"type": "integer"
},
"queryTemplate": {
"type": "string"
},
Expand Down

0 comments on commit d027392

Please sign in to comment.