{"_id":"@dynatrace-sdk/client-davis-copilot","name":"@dynatrace-sdk/client-davis-copilot","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@dynatrace-sdk/client-davis-copilot","version":"1.0.0","dependencies":{"@dynatrace-sdk/http-client":"^1.3.1"},"license":"Apache-2.0","main":"./cjs/index.js","module":"./esm/index.js","types":"./types/index.d.ts","description":"[![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-davis-copilot/v/1.0.0) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)","_id":"@dynatrace-sdk/client-davis-copilot@1.0.0","_integrity":"sha512-foYWvcoI3kp4sWpxxKEk/pC32nONgWalzshU/0lgdgoTYZbKC7nrW4LNnj2Q31q3UhB6d7HZlkThuq3bnv70ig==","_resolved":"/home/jenkins/agent/workspace/natrace-npm-packages-prod_master/app-fw-npm-packages/dynatrace-sdk-client-davis-copilot-1.0.0.tgz","_from":"file:dynatrace-sdk-client-davis-copilot-1.0.0.tgz","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-foYWvcoI3kp4sWpxxKEk/pC32nONgWalzshU/0lgdgoTYZbKC7nrW4LNnj2Q31q3UhB6d7HZlkThuq3bnv70ig==","shasum":"44656c244be5ed9627bffba9784a8400be2c425b","tarball":"https://registry.npmjs.org/@dynatrace-sdk/client-davis-copilot/-/client-davis-copilot-1.0.0.tgz","fileCount":137,"unpackedSize":232414,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD77ERmIfseMZ96yQ6eUz6UEXqBzV5YS11+2V79JR5gKQIhALpKOs3jTkPf74mjN0fugVZVXOK3IBG/r+WSc8Cp7uAs"}]},"_npmUser":{"name":"dynatrace-nodejs","email":"nodejs@dynatrace.com"},"directories":{},"maintainers":[{"name":"dynatrace-nodejs","email":"nodejs@dynatrace.com"},{"name":"stefan.wolfsteiner.dynatrace","email":"stefan.wolfsteiner@dynatrace.com"},{"name":"wasserb","email":"Stefan.wasserbauer@dynatrace.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/client-davis-copilot_1.0.0_1756734712177_0.1594640074529987"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-01T13:51:52.046Z","1.0.0":"2025-09-01T13:51:52.394Z","modified":"2025-09-01T13:51:52.835Z"},"maintainers":[{"name":"dynatrace-nodejs","email":"nodejs@dynatrace.com"},{"name":"stefan.wolfsteiner.dynatrace","email":"stefan.wolfsteiner@dynatrace.com"},{"name":"wasserb","email":"Stefan.wasserbauer@dynatrace.com"}],"description":"[![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-davis-copilot/v/1.0.0) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)","license":"Apache-2.0","readme":"# @dynatrace-sdk/client-davis-copilot\n\n[![npm](https://img.shields.io/badge/npm-v1.0.0-blue)](https://www.npmjs.com/package/@dynatrace-sdk/client-davis-copilot/v/1.0.0)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n# Overview\nThis API allows you to interact with Davis CoPilot Generative AI. The API is in preview and is subject to the Dynatrace [preview conditions](https://dt-url.net/z402kem).\n\nRefer to the [feature documentation](https://dt-url.net/gn22k0g) to get familiar with the key concepts.\n\n\n\n## Installation\n\n```bash\nnpm install @dynatrace-sdk/client-davis-copilot\n```\n\n\n## Getting help\n\n- Visit [SDK for Typescript](https://developer.dynatrace.com/reference/sdks/) guide in the [Dynatrace Developer](https://developer.dynatrace.com/)\n- Ask a question in the [Dynatrace Community](https://community.dynatrace.com/)\n\n\n## License\n\nThis SDK is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), see LICENSE for more information.\n\n\n# API reference\n\nFull API reference for the latest version of the SDK is also available at the [Dynatrace Developer](https://developer.dynatrace.com/reference/sdks/client-davis-copilot/).\n\n## publicClient\n\n```js\nimport { publicClient } from '@dynatrace-sdk/client-davis-copilot';\n```\n\n\n<a name=\"documentsearch\"></a>\n### documentSearch\n\n<div class=\"padding-bottom--md\">\n<strong>publicClient.documentSearch(config): Promise&lt;<a href=\"#documentsearchresponse\">DocumentSearchResponse</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nSearch for relevant documents.\n\n**Required scope:** davis-copilot:document-search:execute\n\nAllows to query documents (Dashboards, Notebooks, ...) relevant for your input.\nThe payload is a JSON dictionary provided from the  response.\nPlease review the examples for the correct payload formatting.\n\nParameters:\n- **texts**: List of search strings.\n- **collections**: List of document collections to search in.\n- **exclude** (Optional): List of document ids to exclude from the search.\n\n*Please note, this endpoint is in preview and is subject to the Dynatrace preview conditions, as linked in the overview.*\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type |\n| --- | --- |\n|config.body<sup>*required</sup>|<a href=\"#documentsearchrequest\" target=\"_blank\" rel=\"noopener noreferrer\">DocumentSearchRequest</a>| \n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[DocumentSearchResponse](#documentsearchresponse)|200|List of documents with their relevance scores|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|ClientErrorResponseError||\n|InternalErrorResponseError||\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { publicClient } from \"@dynatrace-sdk/client-davis-copilot\";\n\nconst data = await publicClient.documentSearch({\n  body: {\n    texts: [\"search-string 1,search-string 2,DQL1,DQL2\"],\n    collections: [\n      \"documentCollection 1,documentCollection 2,documentCollection 3\",\n    ],\n  },\n});\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"dql2nl\"></a>\n### dql2nl\n\n<div class=\"padding-bottom--md\">\n<strong>publicClient.dql2nl(config): Promise&lt;<a href=\"#dql2nlresponse\">Dql2NlResponse</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nExplain a DQL (Dynatrace Query Language) query in natural language.\n\n**Required scope:** davis-copilot:dql2nl:execute\n\nGet an explanation for DQL queries. Note that only valid queries are handled.\nThe payload is a JSON dictionary with the following key. Please review the examples for the correct\npayload formatting.\n\nParameters:\n- **dql**: Dql query to explain.\n\n*Please note, this endpoint is in preview and is subject to the Dynatrace preview conditions, as linked in the overview.*\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type |\n| --- | --- |\n|config.body<sup>*required</sup>|<a href=\"#dql2nlrequest\" target=\"_blank\" rel=\"noopener noreferrer\">Dql2NlRequest</a>| \n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[Dql2NlResponse](#dql2nlresponse)|200|Answer from Dql2Nl skill|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|ClientErrorResponseError||\n|InternalErrorResponseError||\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { publicClient } from \"@dynatrace-sdk/client-davis-copilot\";\n\nconst data = await publicClient.dql2nl({\n  body: {\n    dql: 'fetch logs, from:now()-1h, samplingRatio:100| fields timestamp, severity, logfile, message, container| limit 10| filterOut severity == \"NONE\" or severity == \"INFO\"| sort timestamp desc',\n  },\n});\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"dql2nlfeedback\"></a>\n### dql2nlFeedback\n\n<div class=\"padding-bottom--md\">\n<strong>publicClient.dql2nlFeedback(config): Promise&lt;void&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nProvide feedback for a DQL (Dynatrace Query Language) explanation.\n\n**Required scope:** davis-copilot:dql2nl:execute\n\nAllows to provide feedback to a dql2nl response.\nThe payload is a JSON dictionary combining feedback and information from the dql2nl response.\nPlease review the examples for the correct payload formatting.\n\nParameters:\n- **messageToken**: Message token as provided by dql2nl:explain.\n- **origin**: Application name of the caller.\n- **feedback**: Feedback dictionary.\n  - *type*: Type of the feedback: &quot;positive&quot; or &quot;negative&quot;.\n  - *text*: Natural language feedback text.\n  - *category* (Optional): One out of &quot;misunderstood&quot;, &quot;incorrect&quot;, &quot;incomplete&quot;, &quot;error&quot;, &quot;other&quot;.\n  - *improvement* (Optional):\n    - *text*: Suggestion to improve the answer\n    - *confirmation*: true to verify that the improvement suggestion is valid, false otherwise\n- **userQuery** (Optional): Message prompt as sent to the dql2nl:explain endpoint.\n- **queryExplanation* (Optional): Response as received from the dql2nl:explain endpoint.\n\n*Please note, this endpoint is in preview and is subject to the Dynatrace preview conditions, as linked in the overview.*\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type |\n| --- | --- |\n|config.body<sup>*required</sup>|<a href=\"#dql2nlfeedbackrequest\">Dql2NlFeedbackRequest</a>| \n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|void|202|Feedback successfully submitted|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|ClientErrorResponseError||\n|InternalErrorResponseError||\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { publicClient } from \"@dynatrace-sdk/client-davis-copilot\";\n\nconst data = await publicClient.dql2nlFeedback({\n  body: {\n    messageToken: \"...\",\n    origin: \"Notebooks DQL to NL feedback\",\n    feedback: {\n      type: \"positive\",\n      improvement: {\n        text: \"The DQL statement should have shown me metadata for the logs source.\",\n        confirmation: false,\n      },\n    },\n    userQuery: \"describe logs\",\n  },\n});\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"listavailableskills\"></a>\n### listAvailableSkills\n\n<div class=\"padding-bottom--md\">\n<strong>publicClient.listAvailableSkills(config): Promise&lt;<a href=\"#availableskillsresponse\" target=\"_blank\" rel=\"noopener noreferrer\">AvailableSkillsResponse</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nList all available skills.\n\nReturns a list of available skills. The availability depends whether\nDavis-CoPilot has been enabled for your tenant and if the used token has\nthe required scopes.\n\n*Please note, this endpoint is in preview and is subject to the Dynatrace preview conditions, as linked in the overview.*\n\n\n\n</div>\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[AvailableSkillsResponse](#availableskillsresponse)|200|All skills available to the user.|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|ClientErrorResponseError|Client Error.|\n|InternalErrorResponseError|Internal server Error.|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { publicClient } from \"@dynatrace-sdk/client-davis-copilot\";\n\nconst data = await publicClient.listAvailableSkills();\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"nl2dql\"></a>\n### nl2dql\n\n<div class=\"padding-bottom--md\">\n<strong>publicClient.nl2dql(config): Promise&lt;<a href=\"#nl2dqlresponse\">Nl2DqlResponse</a>&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nGenerate a DQL (Dynatrace Query Language) query from natural language.\n\n**Required scope:** davis-copilot:nl2dql:execute\n\nCreate a DQL query from natural language input.\nThe payload is a JSON dictionary with the following keys. Please review the examples for the correct\npayload formatting.\n\nParameters:\n- **text**: Natural language input to create a DQL query.\n\n*Please note, this endpoint is in preview and is subject to the Dynatrace preview conditions, as linked in the overview.*\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type |\n| --- | --- |\n|config.body<sup>*required</sup>|<a href=\"#nl2dqlrequest\" target=\"_blank\" rel=\"noopener noreferrer\">Nl2DqlRequest</a>| \n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[Nl2DqlResponse](#nl2dqlresponse)|200|Answer from Nl2Dql skill|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|ClientErrorResponseError||\n|InternalErrorResponseError||\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { publicClient } from \"@dynatrace-sdk/client-davis-copilot\";\n\nconst data = await publicClient.nl2dql({\n  body: {\n    text: \"Generate a query which shows the latest 10 log lines\",\n  },\n});\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"nl2dqlfeedback\"></a>\n### nl2dqlFeedback\n\n<div class=\"padding-bottom--md\">\n<strong>publicClient.nl2dqlFeedback(config): Promise&lt;void&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nProvide feedback on DQL (Dynatrace Query Language) result created from natural language.\n\n**Required scope:** davis-copilot:nl2dql:execute\n\nAllows to provide feedback to a nl2dql response.\nThe payload is a JSON dictionary combining feedback and information from the nl2dql response.\nPlease review the examples for the correct payload formatting.\n\nParameters:\n- **messageToken**: Message token as provided by nl2dql:explain.\n- **origin**: Application name of the caller.\n- **feedback**: Feedback dictionary.\n  - *type*: Type of the feedback: &quot;positive&quot; or &quot;negative&quot;.\n  - *text*: Natural language feedback text.\n  - *category* (Optional): One out of &quot;misunderstood&quot;, &quot;incorrect&quot;, &quot;incomplete&quot;, &quot;error&quot;, &quot;other&quot;.\n  - *improvement* (Optional):\n    - *text*: Suggestion to improve the answer\n    - *confirmation*: true to verify that the improvement suggestion is valid, false otherwise\n- **userQuery** (Optional): Message prompt as sent to the nl2dql:generate endpoint.\n- **generatedDql* (Optional): Response as received from the nl2dql:generate endpoint.\n\n*Please note, this endpoint is in preview and is subject to the Dynatrace preview conditions, as linked in the overview.*\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type |\n| --- | --- |\n|config.body<sup>*required</sup>|<a href=\"#nl2dqlfeedbackrequest\">Nl2DqlFeedbackRequest</a>| \n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|void|202|Feedback successfully submitted|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|ClientErrorResponseError||\n|InternalErrorResponseError||\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { publicClient } from \"@dynatrace-sdk/client-davis-copilot\";\n\nconst data = await publicClient.nl2dqlFeedback({\n  body: {\n    messageToken: \"...\",\n    origin: \"Notebooks DQL to NL feedback\",\n    feedback: {\n      type: \"positive\",\n      improvement: {\n        text: \"The DQL statement should have shown me metadata for the logs source.\",\n        confirmation: false,\n      },\n    },\n    userQuery: \"Show me the latest 100 logs.\",\n  },\n});\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"recommenderconversation\"></a>\n### recommenderConversation\n\n<div class=\"padding-bottom--md\">\n<strong>publicClient.recommenderConversation(config): Promise&lt;RecommenderResponse&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nRetrieve a message from a recommender conversation.\n\n**Required scope:** davis-copilot:conversations:execute\n\nAllows clients to send messages to the Davis CoPilot recommender and receive responses. The endpoint can handle\nboth, streaming and non-streaming requests.\n\n### Streaming/Non-Streaming mode\nThe mode is is configured via the HTTP Header `Accept`:\n- Non-Streaming `Accept: application/json`\n- Streaming: `Accept: application/x-ndjson`\n\n### Payload Options\nThe payload is a JSON dictionary with the following top level keys. Please review the examples for the correct\npayload formatting.\n\nParameters:\n- **text**: Message to the AI service. The response is a reply to this input.\n- **state** (Optional): Information containing a conversation between user and ai to be continued. If not\n   supplied, a new conversation is started. A state object is obtained from the response of a previous call to\n   the `conversations:message` endpoint. So the client is responsible for storing and providing the state.\n- **context** (Optional): Additional information to provide context to the requests.\n  - *document-retrieval* (Optional): &quot;dynatrace&quot; for using the Dynatrace documentation as context (default), &quot;disabled&quot;\n    for using no document-based context. In the background document-retrieval uses the input text to perform\n    a semantic search to find relevant to augment the context of the conversation.\n  - *supplementary* (Optional): Custom context to be provided for the request. Note that unlike to the text,\n    the supplementary is not anonymized.\n  - *instruction* (Optional): Additional instructions regarding formatting and output structure\n    (e.g. &quot;- Answer in bullet points&quot;, &quot;Output the answer as JSON&quot;)\n\n\n*Please note, this endpoint is in preview and is subject to the Dynatrace preview conditions, as linked in the overview.*\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type |\n| --- | --- |\n|config.body<sup>*required</sup>|<a href=\"#conversationrequest\" target=\"_blank\" rel=\"noopener noreferrer\">ConversationRequest</a>| \n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|[ErrorEvent](#errorevent)|200|Answer from recommender skill.\n\nThe response is a streaming response consisting of the following possible tokens:\nStart, Progress, Tokens, Notification, Content, End, Error. Please select the individual types to view the\nspecific response format. A usual token stream follows the sequence: Start, Progress, Tokens, ... End.\n|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|ClientErrorResponseError||\n|InternalErrorResponseError|Service unavailable|\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { publicClient } from \"@dynatrace-sdk/client-davis-copilot\";\n\nconst data = await publicClient.recommenderConversation({\n  acceptType: \"application/json\",\n  body: { text: \"How can I instrument my java service?\" },\n});\n```\n\n</details>\n\n\n\n</div>\n\n\n<a name=\"recommenderfeedback\"></a>\n### recommenderFeedback\n\n<div class=\"padding-bottom--md\">\n<strong>publicClient.recommenderFeedback(config): Promise&lt;void&gt;</strong>\n\n<div class=\"padding-left--md\">\n\nProvide feedback for a recommender conversation.\n\n**Required scope:** davis-copilot:conversations:execute\n\nAllows to provide feedback to a conversational recommender response.\nThe payload is a JSON dictionary combining feedback and information from the conversational recommender response.\nPlease review the examples for the correct payload formatting.\n\nParameters:\n- **messageToken**: Message token as provided by conversation:message.\n- **origin**: Application name of the caller.\n- **feedback**: Feedback dictionary.\n  - *type*: Type of the feedback: &quot;positive&quot; or &quot;negative&quot;.\n  - *text*: Natural language feedback text.\n- **userPrompt** (Optional): Message prompt as sent to the conversation:message endpoint.\n- **copilotResponse** (Optional): Response as received from the conversation:message endpoint.\n- **sources** (Optional): List of sources as received from the conversation:message endpoint.\n\n*Please note, this endpoint is in preview and is subject to the Dynatrace preview conditions, as linked in the overview.*\n\n\n\n</div>\n\n\n#### Parameters\n\n| Name | Type |\n| --- | --- |\n|config.body<sup>*required</sup>|<a href=\"#conversationfeedbackrequest\">ConversationFeedbackRequest</a>| \n\n\n\n\n#### Returns\n\n| Return type | Status code | Description |\n|---|---|---|\n|void|202|Feedback successfully submitted|\n\n\n#### Throws\n\n| Error Type | Error Message |\n|---|---|\n|ClientErrorResponseError||\n|InternalErrorResponseError||\n\n\n<details>\n<summary>\nCode example\n</summary>\n\n```ts\nimport { publicClient } from \"@dynatrace-sdk/client-davis-copilot\";\n\nconst data = await publicClient.recommenderFeedback({\n  body: {\n    messageToken: \"...\",\n    origin: \"...\",\n    feedback: {\n      type: \"positive\",\n      improvement: {\n        text: \"The DQL statement should have shown me metadata for the logs source.\",\n        confirmation: false,\n      },\n    },\n  },\n});\n```\n\n</details>\n\n\n\n</div>\n\n## Types\n\n### AvailableSkillsResponse\n\n| Name | Type |\n| --- | --- |\n|skills|Array&lt;\"conversation\" &#124; \"nl2dql\" &#124; \"dql2nl\" &#124; \"documentSearch\"&gt;|\n\n### ClientErrorResponse\n\n| Name | Type |\n| --- | --- |\n|error<sup>*required</sup>|<a href=\"#clienterrorresponseobject\" target=\"_blank\" rel=\"noopener noreferrer\">ClientErrorResponseObject</a>|\n\n### ClientErrorResponseObject\n\n| Name | Type |\n| --- | --- |\n|code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| \n|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### ContentEvent\n\n| Name | Type |\n| --- | --- |\n|data|object| \n|event|\"start\" &#124; \"progress\" &#124; \"notification\" &#124; \"tokens\" &#124; \"content\" &#124; \"end\" &#124; \"error\"|\n\n### ConversationContext\n\n| Name | Type |\n| --- | --- |\n|type<sup>*required</sup>|\"supplementary\" &#124; \"document-retrieval\" &#124; \"instruction\"| \n|value<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### ConversationFeedback\n\n| Name | Type | Description |\n| --- | --- | --- |\n|category|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Must be one of \\[ &quot;misunderstood&quot;, &quot;incorrect&quot;, &quot;incomplete&quot;, &quot;error&quot;, &quot;other&quot; ] |\n|improvement|<a href=\"#conversationimprovedsummary\">ConversationImprovedSummary</a>| |\n|text|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|type<sup>*required</sup>|\"positive\" &#124; \"negative\"| |\n\n### ConversationFeedbackRequest\n\n| Name | Type |\n| --- | --- |\n|copilotResponse|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|feedback<sup>*required</sup>|<a href=\"#conversationfeedback\" target=\"_blank\" rel=\"noopener noreferrer\">ConversationFeedback</a>| \n|messageToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|origin<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|sources|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;| \n|userPrompt|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### ConversationImprovedSummary\n\n| Name | Type |\n| --- | --- |\n|confirmation<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| \n|text<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### ConversationRequest\n\n| Name | Type | Description |\n| --- | --- | --- |\n|annotations|<a href=\"#conversationrequestannotations\">ConversationRequestAnnotations</a>|Specify the annotation information which will be used to add extra context to the request, e.g. <code>Origin app</code>. Annotation key and value are restricted to be at most 128 characters and at most 10 annotations are accepted. This information is not masked. |\n|context|Array&lt;<a href=\"#conversationcontext\" target=\"_blank\" rel=\"noopener noreferrer\">ConversationContext</a>&gt;|Specify the information sources which will be used to process the request. Empty or null will default to the standard Davis CoPilot documentation search. |\n|state|<a href=\"#state\">State</a>| |\n|text<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n\n### ConversationRequestAnnotations\n\nSpecify the annotation information which will be used to add extra context to the request, e.g. `Origin app`. Annotation key and value are restricted to be at most 128 characters and at most 10 annotations are accepted. This information is not masked.\n\n**type**: Record&lt;string, AnnotationItem | undefined&gt;\n\n### ConversationResponse\n\n| Name | Type |\n| --- | --- |\n|messageToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|metadata<sup>*required</sup>|<a href=\"#metadatawithsource\" target=\"_blank\" rel=\"noopener noreferrer\">MetadataWithSource</a>| \n|state<sup>*required</sup>|<a href=\"#state\">State</a>| \n|status<sup>*required</sup>|\"SUCCESSFUL\" &#124; \"SUCCESSFUL_WITH_WARNINGS\" &#124; \"FAILED\"| \n|text<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### DocumentMetadata\n\n| Name | Type | Description |\n| --- | --- | --- |\n|description|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Users description of the document |\n|externalId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|id|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|name|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|type|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Type of document (notebook or dashboard) |\n|version|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Starting at 1, every modification of the document to either metadata or content increases the version number |\n\n### DocumentSearchRequest\n\n| Name | Type | Description |\n| --- | --- | --- |\n|collections<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|The name of the document collections corresponding to the names in the vectorstore. |\n|exclude|null &#124; Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|Must be a uuid hash matching a document (for now, no patterns/wildcards) |\n|texts<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;| |\n\n### DocumentSearchResponse\n\n| Name | Type | Description |\n| --- | --- | --- |\n|messageToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Must be a random uuid hash to identify the response |\n|results<sup>*required</sup>|Array&lt;<a href=\"#scoreddocument\" target=\"_blank\" rel=\"noopener noreferrer\">ScoredDocument</a>&gt;| |\n|status<sup>*required</sup>|\"SUCCESSFUL\" &#124; \"SUCCESSFUL_WITH_WARNINGS\" &#124; \"FAILED\"| |\n\n### Dql2NlFeedback\n\n| Name | Type | Description |\n| --- | --- | --- |\n|category|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Must be one of \\[ &quot;misunderstood&quot;, &quot;incorrect&quot;, &quot;incomplete&quot;, &quot;error&quot;, &quot;other&quot; ] |\n|improvement|<a href=\"#dql2nlimprovedsummary\">Dql2NlImprovedSummary</a>| |\n|text|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|type<sup>*required</sup>|\"positive\" &#124; \"negative\"| |\n\n### Dql2NlFeedbackRequest\n\n| Name | Type |\n| --- | --- |\n|feedback<sup>*required</sup>|<a href=\"#dql2nlfeedback\" target=\"_blank\" rel=\"noopener noreferrer\">Dql2NlFeedback</a>| \n|messageToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|origin<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|queryExplanation|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|userQuery<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### Dql2NlImprovedSummary\n\n| Name | Type |\n| --- | --- |\n|confirmation<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| \n|text<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### Dql2NlRequest\n\n| Name | Type |\n| --- | --- |\n|dql<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### Dql2NlResponse\n\n| Name | Type |\n| --- | --- |\n|explanation<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|messageToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|metadata|<a href=\"#metadata\">Metadata</a>| \n|status<sup>*required</sup>|\"SUCCESSFUL\" &#124; \"SUCCESSFUL_WITH_WARNINGS\" &#124; \"FAILED\"| \n|summary<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### EndEvent\n\nThe EndEvent is sent by the server to indicate the end of the conversation.\nIt is comparable to the non-streaming response, containing the full `answer` comprised of all tokens,\nthe `sources` of the answer, and the `state` of the conversation that can be used for continuation.\n\n| Name | Type |\n| --- | --- |\n|data|<a href=\"#endeventdata\" target=\"_blank\" rel=\"noopener noreferrer\">EndEventData</a>| \n|event|\"start\" &#124; \"progress\" &#124; \"notification\" &#124; \"tokens\" &#124; \"content\" &#124; \"end\" &#124; \"error\"|\n\n### EndEventData\n\n| Name | Type |\n| --- | --- |\n|answer|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|sources|Array&lt;<a href=\"#sourcedocument\">SourceDocument</a>&gt;| \n|state|<a href=\"#state\" target=\"_blank\" rel=\"noopener noreferrer\">State</a>|\n\n### ErrorEvent\n\nThe ErrorEvent is sent by the server to indicate an error and that the conversation cannot be continued.\nThis means the stream is closed and the client should not expect any further events.\nIt contains the `code` of the error representing the equivalent HTTP code and human readable `message`.\n\n| Name | Type |\n| --- | --- |\n|data|<a href=\"#errormessage\">ErrorMessage</a>| \n|event|\"start\" &#124; \"progress\" &#124; \"notification\" &#124; \"tokens\" &#124; \"content\" &#124; \"end\" &#124; \"error\"|\n\n### ErrorMessage\n\n| Name | Type |\n| --- | --- |\n|code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| \n|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### InternalErrorResponse\n\n| Name | Type |\n| --- | --- |\n|error<sup>*required</sup>|<a href=\"#internalerrorresponseobject\" target=\"_blank\" rel=\"noopener noreferrer\">InternalErrorResponseObject</a>|\n\n### InternalErrorResponseObject\n\n| Name | Type |\n| --- | --- |\n|code<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| \n|message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### Metadata\n\n| Name | Type |\n| --- | --- |\n|notifications|Array&lt;<a href=\"#notification\">Notification</a>&gt;|\n\n### MetadataWithSource\n\n| Name | Type |\n| --- | --- |\n|notifications|Array&lt;<a href=\"#notification\" target=\"_blank\" rel=\"noopener noreferrer\">Notification</a>&gt;| \n|sources|Array&lt;<a href=\"#sourcedocument\">SourceDocument</a>&gt;|\n\n### Nl2DqlFeedback\n\n| Name | Type | Description |\n| --- | --- | --- |\n|category|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Must be one of \\[ &quot;misunderstood&quot;, &quot;incorrect&quot;, &quot;incomplete&quot;, &quot;error&quot;, &quot;other&quot; ] |\n|improvement|<a href=\"#nl2dqlimprovedsummary\" target=\"_blank\" rel=\"noopener noreferrer\">Nl2DqlImprovedSummary</a>| |\n|text|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |\n|type<sup>*required</sup>|\"positive\" &#124; \"negative\"| |\n\n### Nl2DqlFeedbackRequest\n\n| Name | Type |\n| --- | --- |\n|feedback<sup>*required</sup>|<a href=\"#nl2dqlfeedback\">Nl2DqlFeedback</a>| \n|generatedDql|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|messageToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|origin<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|userQuery<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### Nl2DqlImprovedSummary\n\n| Name | Type |\n| --- | --- |\n|confirmation<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)| \n|text<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### Nl2DqlRequest\n\n| Name | Type |\n| --- | --- |\n|text<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### Nl2DqlResponse\n\n| Name | Type |\n| --- | --- |\n|dql<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|messageToken<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|metadata|<a href=\"#metadata\" target=\"_blank\" rel=\"noopener noreferrer\">Metadata</a>| \n|status<sup>*required</sup>|\"SUCCESSFUL\" &#124; \"SUCCESSFUL_WITH_WARNINGS\" &#124; \"FAILED\"|\n\n### Notification\n\n| Name | Type |\n| --- | --- |\n|message|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|notificationType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|severity|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### NotificationEvent\n\nThe NotificationEvent is sent by the server in case something do not fully go as planned.\nIt contains the `severity` of the notification (e.g. Warning), the `type` of issue, and a `message`.\n\n| Name | Type |\n| --- | --- |\n|data|<a href=\"#notification\">Notification</a>| \n|event|\"start\" &#124; \"progress\" &#124; \"notification\" &#124; \"tokens\" &#124; \"content\" &#124; \"end\" &#124; \"error\"|\n\n### ProgressEvent\n\nThe ProgressEvent is sent by the server to the client to indicate progress.\nIt contains at the `type` of progress and a `message` to be displayed to the user.\n\n| Name | Type |\n| --- | --- |\n|data|<a href=\"#progresseventdata\" target=\"_blank\" rel=\"noopener noreferrer\">ProgressEventData</a>| \n|event|\"start\" &#124; \"progress\" &#124; \"notification\" &#124; \"tokens\" &#124; \"content\" &#124; \"end\" &#124; \"error\"|\n\n### ProgressEventData\n\n| Name | Type |\n| --- | --- |\n|message|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|type|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### ScoredDocument\n\n| Name | Type |\n| --- | --- |\n|documentId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|documentMetadata<sup>*required</sup>|<a href=\"#documentmetadata\">DocumentMetadata</a>| \n|relevanceScore<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|\n\n### SourceDocument\n\n| Name | Type |\n| --- | --- |\n|title|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|type|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|url|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### StartEvent\n\nThe StartEvent is the first event sent by the server to the client.\nIt contains a `messageToken` that is used to identify the conversation.\n\n| Name | Type |\n| --- | --- |\n|data|<a href=\"#starteventdata\" target=\"_blank\" rel=\"noopener noreferrer\">StartEventData</a>| \n|event|\"start\" &#124; \"progress\" &#124; \"notification\" &#124; \"tokens\" &#124; \"content\" &#124; \"end\" &#124; \"error\"|\n\n### StartEventData\n\n| Name | Type |\n| --- | --- |\n|messageToken|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### State\n\n| Name | Type |\n| --- | --- |\n|conversationId|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|history|Array&lt;object&gt;| \n|skillName|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| \n|version|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|\n\n### TokensEvent\n\nThe TokensEvent contains the tokens streamed from the server to the client during the conversation.\nIt may contain multiple `tokens`.\n\n| Name | Type |\n| --- | --- |\n|data|<a href=\"#tokenseventdata\">TokensEventData</a>| \n|event|\"start\" &#124; \"progress\" &#124; \"notification\" &#124; \"tokens\" &#124; \"content\" &#124; \"end\" &#124; \"error\"|\n\n### TokensEventData\n\n| Name | Type |\n| --- | --- |\n|tokens|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|\n\n## Enums\n\n<a name=\"conversationcontexttype\"></a>\n### ConversationContextType\n\n<div class=\"padding-left--md\">\n\n\n\n#### Enum keys\n\n<div class=\"padding-left--md\">\n\n`DocumentRetrieval` | `Instruction` | `Supplementary`\n\n</div>\n\n\n</div>\n\n<a name=\"conversationfeedbacktype\"></a>\n### ConversationFeedbackType\n\n<div class=\"padding-left--md\">\n\n\n\n#### Enum keys\n\n<div class=\"padding-left--md\">\n\n`Negative` | `Positive`\n\n</div>\n\n\n</div>\n\n<a name=\"dql2nlfeedbacktype\"></a>\n### Dql2NlFeedbackType\n\n<div class=\"padding-left--md\">\n\n\n\n#### Enum keys\n\n<div class=\"padding-left--md\">\n\n`Negative` | `Positive`\n\n</div>\n\n\n</div>\n\n<a name=\"eventtype\"></a>\n### EventType\n\n<div class=\"padding-left--md\">\n\n\n\n#### Enum keys\n\n<div class=\"padding-left--md\">\n\n`Content` | `End` | `Error` | `Notification` | `Progress` | `Start` | `Tokens`\n\n</div>\n\n\n</div>\n\n<a name=\"nl2dqlfeedbacktype\"></a>\n### Nl2DqlFeedbackType\n\n<div class=\"padding-left--md\">\n\n\n\n#### Enum keys\n\n<div class=\"padding-left--md\">\n\n`Negative` | `Positive`\n\n</div>\n\n\n</div>\n\n<a name=\"skilltype\"></a>\n### SkillType\n\n<div class=\"padding-left--md\">\n\n\n\n#### Enum keys\n\n<div class=\"padding-left--md\">\n\n`Conversation` | `DocumentSearch` | `Dql2nl` | `Nl2dql`\n\n</div>\n\n\n</div>\n\n<a name=\"status\"></a>\n### Status\n\n<div class=\"padding-left--md\">\n\n\n\n#### Enum keys\n\n<div class=\"padding-left--md\">\n\n`Failed` | `Successful` | `SuccessfulWithWarnings`\n\n</div>\n\n\n</div>\n","readmeFilename":"README.md","_rev":"1-a1d3a314a151ee2f9b3b2dff2b2f8eec"}