Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
Esta página contiene la documentación de la API del módulo de interfaz de usuario Asistencia con conocimientos generativos, también llamado Asistencia con conocimientos V2. Los agentes usan este módulo para consultar las bases de conocimientos de su empresa y recibir respuestas basadas en IA generativa.
Uso
Importa el módulo en tu página HTML con el siguiente código:
En la siguiente sección se indican los tipos personalizados que utiliza el componente.
KnowledgeAssistV2Config
interfaceKnowledgeAssistV2Config{articleLinkConfig:{/** * Whether to open the article in a new tab, or as a popup. Defaults to new * tab. */target?:"blank"|"popup";/** * Options to configure the popup's size and location. See * https://developer.mozilla.org/en-US/docs/Web/API/Window/open#window_features. */popupWindowOptions?:string;/** * The field name on the document metadata if a separate article link source * is provided. */linkMetadataKey?:string;};showCopyAnswer:boolean;showPasteAnswer:boolean;}
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-10 (UTC)."],[[["\u003cp\u003eThis page documents the API for the Generative Knowledge Assist UI module (Knowledge Assist V2), which helps agents query knowledge bases and receive AI-powered answers.\u003c/p\u003e\n"],["\u003cp\u003eThe module can be imported into an HTML page using a provided script tag and embedded using the \u003ccode\u003e<agent-assist-knowledge-assist-v2>\u003c/code\u003e tag.\u003c/p\u003e\n"],["\u003cp\u003eThe module accepts string-based attributes like \u003ccode\u003esession-id\u003c/code\u003e and \u003ccode\u003eparent\u003c/code\u003e, which can be set directly in the HTML template or via JavaScript.\u003c/p\u003e\n"],["\u003cp\u003eThe module also takes a \u003ccode\u003econfig\u003c/code\u003e input, of type \u003ccode\u003eKnowledgeAssistV2Config\u003c/code\u003e, which allows customization of the module, such as how articles are opened and whether copy/paste functions are available.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eKnowledgeAssistV2Config\u003c/code\u003e allows configuring article links, controlling whether to open in a new tab or popup, and enabling copy/paste answer features.\u003c/p\u003e\n"]]],[],null,["# Knowledge assist\n\nThis page contains the API documentation for the [Generative knowledge assist](/agent-assist/docs/generative-knowledge-assist) UI module, also called Knowledge Assist V2. This module is used by agents to query their company's knowledge bases and receive generative AI-powered answers.\n\nUsage\n-----\n\nImport the module in your HTML page using the following code: \n\n \u003cscript src=\"https://www.gstatic.com/agent-assist-ui-modules/v2/knowledge_assist.js\"\u003e\u003c/script\u003e\n\nEmbed the module using the following tag: \n\n \u003cagent-assist-knowledge-assist-v2\u003e\n\nAttributes\n----------\n\n### Usage\n\nAttributes are string-based component properties which can be set in the following ways:\n\nFrom your HTML template directly: \n\n \u003celement-selector property-name=\"value\"\u003e\n\nFrom your JavaScript code: \n\n var el = document.querySelector('element-selector');\n el.setAttribute('property-name', 'value');\n\nInputs\n------\n\n### Usage\n\nInputs are typically JavaScript objects or other complex property types which must be assigned on the element instance directly: \n\n const el = document.querySelector('element-selector');\n el.propertyName = value;\n\nTypes\n-----\n\nSee the following section for the custom types used by the component.\n\n### KnowledgeAssistV2Config\n\n interface KnowledgeAssistV2Config {\n articleLinkConfig: {\n /**\n * Whether to open the article in a new tab, or as a popup. Defaults to new\n * tab.\n */\n target?: \"blank\" | \"popup\";\n /**\n * Options to configure the popup's size and location. See\n * https://developer.mozilla.org/en-US/docs/Web/API/Window/open#window_features.\n */\n popupWindowOptions?: string;\n /**\n * The field name on the document metadata if a separate article link source\n * is provided.\n */\n linkMetadataKey?: string;\n };\n showCopyAnswer: boolean;\n showPasteAnswer: boolean;\n }"]]