diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f51418b43..5a94f7f44 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -20,7 +20,7 @@ Provide a list of your changes here. If you are fixing a bug, please provide ste - I have checked for/fixed spelling, linting, and other errors - I have commented my code for clarity -- I have made corresponding changes to the documentation (we use [TypeDoc](https://typedoc.org/) to document our code) +- I have made corresponding changes to the documentation (updating the doc strings in the code is sufficient) - My changes generate no new warnings - I have added tests that validates my changes, and provides sufficient test coverage. I have tested with: - Local testing diff --git a/js/.nycrc b/js/.nycrc index be9656bd3..03bc6be3d 100644 --- a/js/.nycrc +++ b/js/.nycrc @@ -3,7 +3,7 @@ "include": ["packages/**/src/**/*.ts", "lib/**/*.js"], "exclude": [ "**/node_modules/**", - "**/tests/**", + "**/testing/**", "**/coverage/**", "**/*.d.ts", "**/*.spec.ts", diff --git a/js/package.json b/js/package.json index b1e3c421b..8bdf8cc9a 100644 --- a/js/package.json +++ b/js/package.json @@ -59,8 +59,6 @@ "sponge": "^0.1.0", "tinyify": "^4.0.0", "ts-node": "^10.9.2", - "typedoc": "^0.25.7", - "typedoc-plugin-markdown": "^3.17.1", "typescript": "^5.3.3", "wsrun": "^5.2.4" } diff --git a/js/packages/api/teams-ai.api.json b/js/packages/api/teams-ai.api.json index d9b174b75..67459db38 100644 --- a/js/packages/api/teams-ai.api.json +++ b/js/packages/api/teams-ai.api.json @@ -1,13771 +1,30104 @@ { - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.35.4", - "schemaVersion": 1011, - "oldestForwardsCompatibleVersion": 1001, - "tsdocConfig": { - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "noStandardTags": true, - "tagDefinitions": [ + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.39.1", + "schemaVersion": 1011, + "oldestForwardsCompatibleVersion": 1001, + "tsdocConfig": { + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": true, + "tagDefinitions": [ + { + "tagName": "@alpha", + "syntaxKind": "modifier" + }, + { + "tagName": "@beta", + "syntaxKind": "modifier" + }, + { + "tagName": "@defaultValue", + "syntaxKind": "block" + }, + { + "tagName": "@decorator", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@deprecated", + "syntaxKind": "block" + }, + { + "tagName": "@eventProperty", + "syntaxKind": "modifier" + }, + { + "tagName": "@example", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@experimental", + "syntaxKind": "modifier" + }, + { + "tagName": "@inheritDoc", + "syntaxKind": "inline" + }, + { + "tagName": "@internal", + "syntaxKind": "modifier" + }, + { + "tagName": "@label", + "syntaxKind": "inline" + }, + { + "tagName": "@link", + "syntaxKind": "inline", + "allowMultiple": true + }, + { + "tagName": "@override", + "syntaxKind": "modifier" + }, + { + "tagName": "@packageDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@param", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@privateRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@public", + "syntaxKind": "modifier" + }, + { + "tagName": "@readonly", + "syntaxKind": "modifier" + }, + { + "tagName": "@remarks", + "syntaxKind": "block" + }, + { + "tagName": "@returns", + "syntaxKind": "block" + }, + { + "tagName": "@sealed", + "syntaxKind": "modifier" + }, + { + "tagName": "@see", + "syntaxKind": "block" + }, + { + "tagName": "@throws", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@typeParam", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@virtual", + "syntaxKind": "modifier" + }, + { + "tagName": "@betaDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@internalRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@preapproved", + "syntaxKind": "modifier" + } + ], + "supportForTags": { + "@alpha": true, + "@beta": true, + "@defaultValue": true, + "@decorator": true, + "@deprecated": true, + "@eventProperty": true, + "@example": true, + "@experimental": true, + "@inheritDoc": true, + "@internal": true, + "@label": true, + "@link": true, + "@override": true, + "@packageDocumentation": true, + "@param": true, + "@privateRemarks": true, + "@public": true, + "@readonly": true, + "@remarks": true, + "@returns": true, + "@sealed": true, + "@see": true, + "@throws": true, + "@typeParam": true, + "@virtual": true, + "@betaDocumentation": true, + "@internalRemarks": true, + "@preapproved": true + }, + "reportUnsupportedHtmlElements": false + } + }, + "kind": "Package", + "canonicalReference": "@microsoft/teams-ai!", + "docComment": "", + "name": "@microsoft/teams-ai", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "@microsoft/teams-ai!", + "name": "", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Variable", + "canonicalReference": "@microsoft/teams-ai!ACTION_INVOKE_NAME:var", + "docComment": "/**\n * @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "ACTION_INVOKE_NAME = " + }, + { + "kind": "Content", + "text": "\"adaptiveCard/action\"" + } + ], + "fileUrlPath": "src/AdaptiveCards.ts", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isReadonly": true, + "releaseTag": "Public", + "name": "ACTION_INVOKE_NAME", + "variableTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!ActionAugmentationSection:class", + "docComment": "/**\n * A prompt section that renders a list of actions to the prompt.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ActionAugmentationSection extends " + }, + { + "kind": "Reference", + "text": "PromptSectionBase", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/augmentations/ActionAugmentationSection.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "ActionAugmentationSection", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!ActionAugmentationSection:constructor(1)", + "docComment": "/**\n * Creates a new `ActionAugmentationSection` instance.\n *\n * @param actions - List of actions to render.\n *\n * @param callToAction - Text to display after the list of actions.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(actions: " + }, + { + "kind": "Reference", + "text": "ChatCompletionAction", + "canonicalReference": "@microsoft/teams-ai!ChatCompletionAction:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", callToAction: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "actions", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "callToAction", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!ActionAugmentationSection#actions:member", + "docComment": "/**\n * Map of action names to actions.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get actions(): " + }, + { + "kind": "Reference", + "text": "Map", + "canonicalReference": "!Map:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "actions", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ActionAugmentationSection#renderAsMessages:member(1)", + "docComment": "/**\n * Renders the prompt section as a list of `Message` objects.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param memory - Interface for accessing state variables.\n *\n * @param functions - Functions for rendering prompts.\n *\n * @param tokenizer - Tokenizer to use for encoding/decoding text.\n *\n * @param maxTokens - Maximum number of tokens allowed for the rendered prompt.\n *\n * @returns The rendered prompt section.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsMessages" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!ActionPlanner:class", + "docComment": "/**\n * A planner that uses a Large Language Model (LLM) to generate plans.\n *\n * @remarks\n *\n * The ActionPlanner is a powerful planner that uses a LLM to generate plans. The planner can trigger parameterized actions and send text based responses to the user. The ActionPlanner supports the following advanced features: - **Augmentations:** Augmentations virtually eliminate the need for prompt engineering. Prompts can be configured to use a named augmentation which will be automatically appended to the outgoing prompt. Augmentations let the developer specify whether they want to support multi-step plans (sequence), use OpenAI's functions support (functions), or create an AutoGPT style agent (monologue). - **Validations:** Validators are used to validate the response returned by the LLM and can guarantee that the parameters passed to an action mach a supplied schema. The validator used is automatically selected based on the augmentation being used. Validators also prevent hallucinated action names making it impossible for the LLM to trigger an action that doesn't exist. - **Repair:** The ActionPlanner will automatically attempt to repair invalid responses returned by the LLM using a feedback loop. When a validation fails, the ActionPlanner sends the error back to the model, along with an instruction asking it to fix its mistake. This feedback technique leads to a dramatic reduction in the number of invalid responses returned by the model. @template TState Optional. Type of application state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ActionPlanner implements " + }, + { + "kind": "Reference", + "text": "Planner", + "canonicalReference": "@microsoft/teams-ai!Planner:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/planners/ActionPlanner.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isAbstract": false, + "name": "ActionPlanner", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!ActionPlanner:constructor(1)", + "docComment": "/**\n * Creates a new `ActionPlanner` instance.\n *\n * @param options - Options used to configure the planner.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "ActionPlannerOptions", + "canonicalReference": "@microsoft/teams-ai!ActionPlannerOptions:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ActionPlanner#addSemanticFunction:member(1)", + "docComment": "/**\n * Creates a semantic function that can be registered with the apps prompt manager.\n *\n * @remarks\n *\n * Semantic functions are functions that make model calls and return their results as template parameters to other prompts. For example, you could define a semantic function called 'translator' that first translates the user's input to English before calling your main prompt:\n * ```JavaScript\n * app.ai.prompts.addFunction('translator', app.ai.createSemanticFunction('translator-prompt'));\n * ```\n *\n * You would then create a prompt called \"translator-prompt\" that does the translation and then in your main prompt you can call it using the template expression `{{translator}}`.\n *\n * @param name - The name of the semantic function.\n *\n * @param template - The prompt template to use.\n *\n * @param options - Optional. Override options for the prompt. If omitted, the AI systems configured options will be used.\n *\n * @param prompt - \n *\n * @param validator - \n *\n * @returns {Promise} A promise that resolves to the result of the semantic function.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "addSemanticFunction(prompt: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "PromptTemplate", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" + }, + { + "kind": "Content", + "text": ", validator?: " + }, + { + "kind": "Reference", + "text": "PromptResponseValidator", + "canonicalReference": "@microsoft/teams-ai!PromptResponseValidator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "prompt", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "validator", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "addSemanticFunction" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ActionPlanner#beginTask:member(1)", + "docComment": "/**\n * Starts a new task.\n *\n * @remarks\n *\n * This method is called when the AI system is ready to start a new task. The planner should generate a plan that the AI system will execute. Returning an empty plan signals that there is no work to be performed.\n *\n * The planner should take the users input from `state.temp.input`.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param ai - The AI system that is generating the plan.\n *\n * @returns The plan that was generated.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "beginTask(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", ai: " + }, + { + "kind": "Reference", + "text": "AI", + "canonicalReference": "@microsoft/teams-ai!AI:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "ai", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "beginTask" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ActionPlanner#completePrompt:member(1)", + "docComment": "/**\n * Completes a prompt using an optional validator.\n *\n * @remarks\n *\n * This method allows the developer to manually complete a prompt and access the models response. If a validator is specified, the response will be validated and repaired if necessary. If no validator is specified, the response will be returned as-is.\n *\n * If a validator like the `JSONResponseValidator` is used, the response returned will be a message containing a JSON object. If no validator is used, the response will be a message containing the response text as a string. @template TContent Optional. Type of message content returned for a 'success' response. The `response.message.content` field will be of type TContent. Defaults to `string`. *\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param context - \n *\n * @param memory - A memory interface used to access state variables (the turn state object implements this interface.)\n *\n * @param prompt - Name of the prompt to use or a prompt template.\n *\n * @param validator - Optional. A validator to use to validate the response returned by the model.\n *\n * @returns The result of the LLM call.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "completePrompt(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", prompt: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "PromptTemplate", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" + }, + { + "kind": "Content", + "text": ", validator?: " + }, + { + "kind": "Reference", + "text": "PromptResponseValidator", + "canonicalReference": "@microsoft/teams-ai!PromptResponseValidator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TContent", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 13, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "prompt", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "isOptional": false + }, + { + "parameterName": "validator", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 12 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "completePrompt" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ActionPlanner#continueTask:member(1)", + "docComment": "/**\n * Continues the current task.\n *\n * @remarks\n *\n * This method is called when the AI system has finished executing the previous plan and is ready to continue the current task. The planner should generate a plan that the AI system will execute. Returning an empty plan signals that the task is completed and there is no work to be performed.\n *\n * The output from the last plan step that was executed is passed to the planner via `state.temp.input`.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param ai - The AI system that is generating the plan.\n *\n * @returns The plan that was generated.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "continueTask(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", ai: " + }, + { + "kind": "Reference", + "text": "AI", + "canonicalReference": "@microsoft/teams-ai!AI:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "ai", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "continueTask" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!ActionPlanner#defaultPrompt:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get defaultPrompt(): " + }, + { + "kind": "Content", + "text": "string | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "defaultPrompt", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!ActionPlanner#model:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get model(): " + }, + { + "kind": "Reference", + "text": "PromptCompletionModel", + "canonicalReference": "@microsoft/teams-ai!PromptCompletionModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "model", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!ActionPlanner#prompts:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get prompts(): " + }, + { + "kind": "Reference", + "text": "PromptManager", + "canonicalReference": "@microsoft/teams-ai!PromptManager:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "prompts", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [ + { + "startIndex": 5, + "endIndex": 7 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!ActionPlannerOptions:interface", + "docComment": "/**\n * Options used to configure an `ActionPlanner` instance. @template TState Optional. Type of application state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ActionPlannerOptions " + } + ], + "fileUrlPath": "src/planners/ActionPlanner.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "name": "ActionPlannerOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ActionPlannerOptions#defaultPrompt:member", + "docComment": "/**\n * The default prompt to use.\n *\n * @remarks\n *\n * This can either be the name of a prompt template or a function that returns a prompt template.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultPrompt: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "ActionPlannerPromptFactory", + "canonicalReference": "@microsoft/teams-ai!ActionPlannerPromptFactory:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "defaultPrompt", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ActionPlannerOptions#logRepairs:member", + "docComment": "/**\n * If true, repair attempts will be logged to the console.\n *\n * @remarks\n *\n * The default value is false.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "logRepairs?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "logRepairs", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ActionPlannerOptions#max_repair_attempts:member", + "docComment": "/**\n * Maximum number of repair attempts to make.\n *\n * @remarks\n *\n * The ActionPlanner uses validators and a feedback loop to repair invalid responses returned by the model. This value controls the maximum number of repair attempts that will be made before returning an error. The default value is 3.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_repair_attempts?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "max_repair_attempts", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ActionPlannerOptions#model:member", + "docComment": "/**\n * Model instance to use.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "model: " + }, + { + "kind": "Reference", + "text": "PromptCompletionModel", + "canonicalReference": "@microsoft/teams-ai!PromptCompletionModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "model", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ActionPlannerOptions#prompts:member", + "docComment": "/**\n * Prompt manager used to manage prompts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "prompts: " + }, + { + "kind": "Reference", + "text": "PromptManager", + "canonicalReference": "@microsoft/teams-ai!PromptManager:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "prompts", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ActionPlannerOptions#tokenizer:member", + "docComment": "/**\n * Optional tokenizer to use.\n *\n * @remarks\n *\n * If not specified, a new `GPT3Tokenizer` instance will be created.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "tokenizer?: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "tokenizer", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!ActionPlannerPromptFactory:type", + "docComment": "/**\n * Factory function used to create a prompt template. @template TState Optional. Type of application state.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param planner - The action planner that is generating the prompt.\n *\n * @returns A promise that resolves to the prompt template to use.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type ActionPlannerPromptFactory = " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, planner: " + }, + { + "kind": "Reference", + "text": "ActionPlanner", + "canonicalReference": "@microsoft/teams-ai!ActionPlanner:class" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "PromptTemplate", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/planners/ActionPlanner.ts", + "releaseTag": "Public", + "name": "ActionPlannerPromptFactory", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "typeTokenRange": { + "startIndex": 5, + "endIndex": 14 + } + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!ActionResponseValidator:class", + "docComment": "/**\n * Validates action calls returned by the model.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ActionResponseValidator implements " + }, + { + "kind": "Reference", + "text": "PromptResponseValidator", + "canonicalReference": "@microsoft/teams-ai!PromptResponseValidator:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ValidatedChatCompletionAction", + "canonicalReference": "@microsoft/teams-ai!ValidatedChatCompletionAction:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/validators/ActionResponseValidator.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "ActionResponseValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!ActionResponseValidator:constructor(1)", + "docComment": "/**\n * Creates a new `ActionResponseValidator` instance.\n *\n * @param actions - List of supported actions.\n *\n * @param isRequired - Whether the response is required to call an action.\n *\n * @param noun - Optional. Name of the action to use in feedback messages. Defaults to `action`.\n *\n * @param Noun - Optional. Name of the action to use in feedback messages. Defaults to `Action`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(actions: " + }, + { + "kind": "Reference", + "text": "ChatCompletionAction", + "canonicalReference": "@microsoft/teams-ai!ChatCompletionAction:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", isRequired: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ", noun?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", Noun?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "actions", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "isRequired", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "noun", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": true + }, + { + "parameterName": "Noun", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": true + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!ActionResponseValidator#actions:member", + "docComment": "/**\n * Gets a list of the actions configured for the validator.\n *\n * @returns {ChatCompletionAction[]} A list of the actions configured for the validator.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get actions(): " + }, + { + "kind": "Reference", + "text": "ChatCompletionAction", + "canonicalReference": "@microsoft/teams-ai!ChatCompletionAction:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "actions", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ActionResponseValidator#validateResponse:member(1)", + "docComment": "/**\n * Validates a response to a prompt.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param tokenizer - Tokenizer to use for encoding and decoding text.\n *\n * @param response - Response to validate.\n *\n * @param remaining_attempts - Number of remaining attempts to validate the response.\n *\n * @returns {Promise>} A `Validation` object.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateResponse(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", remaining_attempts: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Validation", + "canonicalReference": "@microsoft/teams-ai!Validation:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ValidatedChatCompletionAction", + "canonicalReference": "@microsoft/teams-ai!ValidatedChatCompletionAction:interface" + }, + { + "kind": "Content", + "text": ">>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 18 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "isOptional": false + }, + { + "parameterName": "remaining_attempts", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateResponse" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 5 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCard:interface", + "docComment": "/**\n * Strongly typed Adaptive Card.\n *\n * @remarks\n *\n * see https://adaptivecards.io/explorer/ for schema details.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AdaptiveCard " + } + ], + "fileUrlPath": "src/AdaptiveCards.ts", + "releaseTag": "Public", + "name": "AdaptiveCard", + "preserveMemberOrder": false, + "members": [ + { + "kind": "IndexSignature", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCard:index(1)", + "docComment": "/**\n * Additional card fields.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "[key: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "]: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "key", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCard#type:member", + "docComment": "/**\n * Required type field.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "'AdaptiveCard'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCards:class", + "docComment": "/**\n * AdaptiveCards class to enable fluent style registration of handlers related to Adaptive Cards. @template TState Type of the turn state object being persisted.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class AdaptiveCards " + } + ], + "fileUrlPath": "src/AdaptiveCards.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "AdaptiveCards", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCards:constructor(1)", + "docComment": "/**\n * Creates a new instance of the AdaptiveCards class.\n *\n * @param app - The top level application class to register handlers with. @template TState The type of the state object used by the application.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(app: " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "app", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCards#actionExecute:member(1)", + "docComment": "/**\n * Adds a route to the application for handling Adaptive Card Action.Execute events. @template TData Optional. Type of the data associated with the action.\n *\n * @param verb - The named action(s) to be handled.\n *\n * @param handler - The code to execute when the action is triggered.\n *\n * @param - {TurnContext} handler.context The current turn context.\n *\n * @param - {TState} handler.state The current turn state.\n *\n * @param - {TData} handler.data The data associated with the action.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "actionExecute" + }, + { + "kind": "Content", + "text": ">(verb: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, data: TData) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "AdaptiveCard", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCard:interface" + }, + { + "kind": "Content", + "text": " | string>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TData", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 22, + "endIndex": 24 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "verb", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 13 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 14, + "endIndex": 21 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "actionExecute" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCards#actionSubmit:member(1)", + "docComment": "/**\n * Adds a route to the application for handling Adaptive Card Action.Submit events.\n *\n * @remarks\n *\n * The route will be added for the specified verb(s) and will be filtered using the `actionSubmitFilter` option. The default filter is to use the `verb` field.\n *\n * For outgoing AdaptiveCards you will need to include the verb's name in the cards Action.Submit. For example:\n * ```JSON\n * {\n * \"type\": \"Action.Submit\",\n * \"title\": \"OK\",\n * \"data\": {\n * \"verb\": \"ok\"\n * }\n * }\n * ```\n *\n * @template TData Optional. Type of the data associated with the action.\n *\n * @param verb - The named action(s) to be handled.\n *\n * @param handler - The code to execute when the action is triggered.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "actionSubmit" + }, + { + "kind": "Content", + "text": ">(verb: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, data: TData) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TData", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 20, + "endIndex": 22 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "verb", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 13 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 14, + "endIndex": 19 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "actionSubmit" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCards#search:member(1)", + "docComment": "/**\n * Adds a route to the application for handling the `Data.Query` request for an `Input.ChoiceSet`.\n *\n * @param dataset - The named dataset(s) to be handled. @callback handler\n *\n * @param handler - The code to execute when the query is triggered.\n *\n * @param - {TurnContext} handler.context The current turn context for the handler callback.\n *\n * @param - {TState} handler.state The current turn state for the handler callback.\n *\n * @param - {Query} handler.query The query parameters for the handler callback.\n *\n * @returns {this} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "search(dataset: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, query: " + }, + { + "kind": "Reference", + "text": "Query", + "canonicalReference": "@microsoft/teams-ai!Query:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "AdaptiveCardsSearchParams", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsSearchParams:interface" + }, + { + "kind": "Content", + "text": ">) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "AdaptiveCardSearchResult", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardSearchResult:interface" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 23, + "endIndex": 25 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "dataset", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 10 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 22 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "search" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardSearchResult:interface", + "docComment": "/**\n * Individual result returned from AdaptiveCards.search() handler.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AdaptiveCardSearchResult " + } + ], + "fileUrlPath": "src/AdaptiveCards.ts", + "releaseTag": "Public", + "name": "AdaptiveCardSearchResult", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardSearchResult#title:member", + "docComment": "/**\n * The title of the result.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "title: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "title", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardSearchResult#value:member", + "docComment": "/**\n * The subtitle of the result.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "value: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "value", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsOptions:interface", + "docComment": "/**\n * Options for AdaptiveCards class.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AdaptiveCardsOptions " + } + ], + "fileUrlPath": "src/AdaptiveCards.ts", + "releaseTag": "Public", + "name": "AdaptiveCardsOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsOptions#actionSubmitFilter:member", + "docComment": "/**\n * Data field used to identify the Action.Submit handler to trigger.\n *\n * @remarks\n *\n * When an Action.Submit is triggered, the field name specified here will be used to determine the handler to route the request to.\n *\n * Defaults to a value of 'verb'.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "actionSubmitFilter?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "actionSubmitFilter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsSearchParams:interface", + "docComment": "/**\n * Parameters passed to AdaptiveCards.search() handler.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AdaptiveCardsSearchParams " + } + ], + "fileUrlPath": "src/AdaptiveCards.ts", + "releaseTag": "Public", + "name": "AdaptiveCardsSearchParams", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsSearchParams#dataset:member", + "docComment": "/**\n * The dataset to search.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "dataset: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "dataset", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsSearchParams#queryText:member", + "docComment": "/**\n * The query text.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "queryText: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "queryText", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!AI:class", + "docComment": "/**\n * AI System.\n *\n * @remarks\n *\n * The AI system is responsible for generating plans, moderating input and output, and generating prompts. It can be used free standing or routed to by the Application object. @template TState Optional. Type of the turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class AI " + } + ], + "fileUrlPath": "src/AI.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isAbstract": false, + "name": "AI", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!AI:constructor(1)", + "docComment": "/**\n * Creates a new AI system.\n *\n * @param options - The options used to configure the AI system.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "AIOptions", + "canonicalReference": "@microsoft/teams-ai!AIOptions:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AI#action:member(1)", + "docComment": "/**\n * Registers a handler for a named action.\n *\n * @remarks\n *\n * The AI systems planner returns plans that are made up of a series of commands or actions that should be performed. Registering a handler lets you provide code that should be run in response to one of the predicted actions.\n *\n * Plans support a DO command which specifies the name of an action to call and an optional set of entities that should be passed to the action. The internal plan executor will call the registered handler for the action passing in the current context, state, and entities.\n *\n * Additionally, the AI system itself uses actions to handle things like unknown actions, flagged input, and flagged output. You can override these actions by registering your own handler for them. The names of the built-in actions are available as static properties on the AI class. @template TParameters Optional. The type of parameters that the action handler expects.\n *\n * @param name - Unique name of the action. @callback handler\n *\n * @param handler - The code to execute when the _ is triggered.\n *\n * @param - {TurnContext} handler.context The current turn context for the handler callback.\n *\n * @param - {TState} handler.state The current turn state for the handler callback.\n *\n * @param - {TParameters} handler.parameters Optional. Entities to pass to the action.\n *\n * @returns {this} The AI system instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "action | undefined" + }, + { + "kind": "Content", + "text": ">(name: " + }, + { + "kind": "Content", + "text": "string | string[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, parameters: TParameters, action?: string) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TParameters", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 13 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 11 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "action" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AI#defaultAction:member(1)", + "docComment": "/**\n * Registers the default handler for a named action.\n *\n * @remarks\n *\n * Default handlers can be replaced by calling the action() method with the same name. @template TParameters Optional. The type of parameters that the action handler expects.\n *\n * @param name - Unique name of the action. @callback handler\n *\n * @param handler - The code to execute when the _ is triggered.\n *\n * @param - {TurnContext} handler.context The current turn context for the handler callback.\n *\n * @param - {TState} handler.state The current turn state for the handler callback.\n *\n * @returns {this} The AI system instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultAction | undefined" + }, + { + "kind": "Content", + "text": ">(name: " + }, + { + "kind": "Content", + "text": "string | string[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, parameters: TParameters, action?: string) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TParameters", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 13 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 11 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "defaultAction" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AI#doAction:member(1)", + "docComment": "/**\n * Manually executes a named action. @template TParameters Optional. Type of entities expected to be passed to the action.\n *\n * @param context - Current turn context.\n *\n * @param state - Current turn state.\n *\n * @param action - Name of the action to execute.\n *\n * @param parameters - Optional. Entities to pass to the action.\n *\n * @returns {Promise} The result of the action.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "doAction" + }, + { + "kind": "Content", + "text": ">(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", action: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", parameters?: " + }, + { + "kind": "Content", + "text": "TParameters" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TParameters", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 14 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "action", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": false + }, + { + "parameterName": "parameters", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "doAction" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AI.DoCommandActionName:member", + "docComment": "/**\n * An action that is called to DO an action.\n *\n * @remarks\n *\n * The action system is used to do other actions. Overriding this action lets you customize the execution of an individual action. You can use it to log actions being used or to prevent certain actions from being executed based on policy.\n *\n * The default behavior is to simply execute the action handler passed in so you will need to perform that logic yourself should you override this action.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static readonly DoCommandActionName = " + }, + { + "kind": "Content", + "text": "\"___DO___\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "DoCommandActionName", + "propertyTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AI.FlaggedInputActionName:member", + "docComment": "/**\n * An action that will be called anytime an input is flagged by the moderator.\n *\n * @remarks\n *\n * The default behavior is to simply log an error to the console. Override to send a custom message to the user.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static readonly FlaggedInputActionName = " + }, + { + "kind": "Content", + "text": "\"___FlaggedInput___\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "FlaggedInputActionName", + "propertyTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AI.FlaggedOutputActionName:member", + "docComment": "/**\n * An action that will be called anytime an output is flagged by the moderator.\n *\n * @remarks\n *\n * The default behavior is to simply log an error to the console. Override to send a custom message to the user.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static readonly FlaggedOutputActionName = " + }, + { + "kind": "Content", + "text": "\"___FlaggedOutput___\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "FlaggedOutputActionName", + "propertyTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AI#hasAction:member(1)", + "docComment": "/**\n * Checks to see if the AI system has a handler for a given action.\n *\n * @param action - Name of the action to check.\n *\n * @returns {boolean} True if the AI system has a handler for the given action.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hasAction(action: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "action", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hasAction" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AI.HttpErrorActionName:member", + "docComment": "/**\n * An action that will be called anytime the planner encounters an HTTP response with status code >= `400`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static readonly HttpErrorActionName = " + }, + { + "kind": "Content", + "text": "\"___HttpError___\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "HttpErrorActionName", + "propertyTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AI#moderator:member", + "docComment": "/**\n * Returns the moderator being used by the AI system.\n *\n * @remarks\n *\n * The default moderator simply allows all messages and plans through without intercepting them.\n *\n * @returns {Moderator} The AI's moderator\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get moderator(): " + }, + { + "kind": "Reference", + "text": "Moderator", + "canonicalReference": "@microsoft/teams-ai!Moderator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "moderator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AI#planner:member", + "docComment": "/**\n * @returns {Planner} Returns the planner being used by the AI system.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get planner(): " + }, + { + "kind": "Reference", + "text": "Planner", + "canonicalReference": "@microsoft/teams-ai!Planner:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "planner", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AI.PlanReadyActionName:member", + "docComment": "/**\n * An action that will be called after the plan has been predicted by the planner and it has passed moderation.\n *\n * @remarks\n *\n * Overriding this action lets you customize the decision to execute a plan separately from the moderator. The default behavior is to proceed with the plans execution only with a plan contains one or more commands. Returning false from this action can be used to prevent the plan from being executed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static readonly PlanReadyActionName = " + }, + { + "kind": "Content", + "text": "\"___PlanReady___\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "PlanReadyActionName", + "propertyTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AI#run:member(1)", + "docComment": "/**\n * Calls the configured planner to generate a plan and executes the plan that is returned.\n *\n * @remarks\n *\n * The moderator is called to review the input and output of the plan. If the moderator flags the input or output then the appropriate action is called. If the moderator allows the input and output then the plan is executed.\n *\n * @param context - Current turn context.\n *\n * @param state - Current turn state.\n *\n * @param start_time - Optional. Time the AI system started running\n *\n * @param step_count - Optional. Number of steps that have been executed.\n *\n * @returns {Promise} True if the plan was completely executed, otherwise false.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "run(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", start_time?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", step_count?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "start_time", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + }, + { + "parameterName": "step_count", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "run" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AI.SayCommandActionName:member", + "docComment": "/**\n * An action that is called to SAY something.\n *\n * @remarks\n *\n * Overriding this action lets you customize the execution of the SAY command. You can use it to log the output being generated or to add support for sending certain types of output as message attachments.\n *\n * The default behavior attempts to look for an Adaptive Card in the output and if found sends it as an attachment. If no Adaptive Card is found then the output is sent as a plain text message.\n *\n * If you override this action and want to automatically send Adaptive Cards as attachments you will need to handle that yourself.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static readonly SayCommandActionName = " + }, + { + "kind": "Content", + "text": "\"___SAY___\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "SayCommandActionName", + "propertyTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AI.StopCommandName:member", + "docComment": "/**\n * A text string that can be returned from an action to stop the AI system from continuing to execute the current plan.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static readonly StopCommandName = " + }, + { + "kind": "Content", + "text": "\"STOP\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "StopCommandName", + "propertyTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AI.TooManyStepsActionName:member", + "docComment": "/**\n * The task either executed too many steps or timed out.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static readonly TooManyStepsActionName = " + }, + { + "kind": "Content", + "text": "\"___TooManySteps___\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "TooManyStepsActionName", + "propertyTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AI.UnknownActionName:member", + "docComment": "/**\n * An action that will be called anytime an unknown action is predicted by the planner.\n *\n * @remarks\n *\n * The default behavior is to simply log an error to the console. The plan is allowed to continue execution by default.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static readonly UnknownActionName = " + }, + { + "kind": "Content", + "text": "\"___UnknownAction___\"" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "UnknownActionName", + "propertyTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": true, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!AIOptions:interface", + "docComment": "/**\n * Options for configuring the AI system. @template TState Type of the turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AIOptions " + } + ], + "fileUrlPath": "src/AI.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "AIOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AIOptions#allow_looping:member", + "docComment": "/**\n * Optional. If true, the AI system will allow the planner to loop.\n *\n * @remarks\n *\n * The default value is `true`.\n *\n * Looping is needed for augmentations like `functions` and `monologue` where the LLM needs to see the result of the last action that was performed. The AI system will attempt to autodetect if it needs to loop so you generally don't need to worry about this setting.\n *\n * If you're using an augmentation like `sequence` you can set this to `false` to guard against any accidental looping.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "allow_looping?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "allow_looping", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AIOptions#max_actions:member", + "docComment": "/**\n * Optional. Maximum number of actions to execute in a single turn.\n *\n * @remarks\n *\n * The default value is 25.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_actions?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "max_actions", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AIOptions#max_time:member", + "docComment": "/**\n * Optional. Maximum amount of time to spend executing a single turn in milliseconds.\n *\n * @remarks\n *\n * The default value is 300000 or 5 minutes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_time?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "max_time", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AIOptions#moderator:member", + "docComment": "/**\n * Optional. The moderator to use for moderating input passed to the model and the output returned by the model.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "moderator?: " + }, + { + "kind": "Reference", + "text": "Moderator", + "canonicalReference": "@microsoft/teams-ai!Moderator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "moderator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AIOptions#planner:member", + "docComment": "/**\n * The planner to use for generating plans.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "planner: " + }, + { + "kind": "Reference", + "text": "Planner", + "canonicalReference": "@microsoft/teams-ai!Planner:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "planner", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!Application:class", + "docComment": "/**\n * Application class for routing and processing incoming requests.\n *\n * @remarks\n *\n * The Application object replaces the traditional ActivityHandler that a bot would use. It supports a simpler fluent style of authoring bots versus the inheritance based approach used by the ActivityHandler class.\n *\n * Additionally, it has built-in support for calling into the SDK's AI system and can be used to create bots that leverage Large Language Models (LLM) and other AI capabilities. @template TState Optional. Type of the turn state. This allows for strongly typed access to the turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Application " + } + ], + "fileUrlPath": "src/Application.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isAbstract": false, + "name": "Application", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!Application:constructor(1)", + "docComment": "/**\n * Creates a new Application instance.\n *\n * @param options - Optional. Options used to configure the application.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ApplicationOptions", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#activity:member(1)", + "docComment": "/**\n * Handles incoming activities of a given type.\n *\n * @param type - Name of the activity type to match or a regular expression to match against the incoming activity type. An array of type names or expression can also be passed in.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @param - {TurnContext} handler.context The context object for the turn.\n *\n * @param - {TState} handler.state The state object for the turn.\n *\n * @returns {this} The application instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "activity(type: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 17, + "endIndex": 18 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 10 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 16 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "activity" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!Application#adapter:member", + "docComment": "/**\n * The bot's adapter.\n *\n * @returns {BotAdapter} The bot's adapter that is configured for the application.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get adapter(): " + }, + { + "kind": "Reference", + "text": "BotAdapter", + "canonicalReference": "botbuilder-core!BotAdapter:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "adapter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!Application#adaptiveCards:member", + "docComment": "/**\n * Fluent interface for accessing Adaptive Card specific features.\n *\n * @returns {AdaptiveCards} The AdaptiveCards instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get adaptiveCards(): " + }, + { + "kind": "Reference", + "text": "AdaptiveCards", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCards:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "adaptiveCards", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#addRoute:member(1)", + "docComment": "/**\n * Adds a new route to the application.\n *\n * @remarks\n *\n * Developers won't typically need to call this method directly as it's used internally by all of the fluent interfaces to register routes for their specific activity types.\n *\n * Routes will be matched in the order they're added to the application. The first selector to return `true` when an activity is received will have its handler called.\n *\n * Invoke-based activities receive special treatment and are matched separately as they typically have shorter execution timeouts.\n *\n * @param selector - Function thats used to select a route. The function should return true to trigger the route.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @param isInvokeRoute - Optional. Boolean indicating if the RouteSelector is for an activity that uses \"invoke\" which require special handling. Defaults to `false`.\n *\n * @returns {this} The application instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "addRoute(selector: " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "RouteHandler", + "canonicalReference": "@microsoft/teams-ai!RouteHandler:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", isInvokeRoute?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "selector", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "isInvokeRoute", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "addRoute" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!Application#ai:member", + "docComment": "/**\n * Fluent interface for accessing AI specific features.\n *\n * @remarks\n *\n * This property is only available if the Application was configured with `ai` options. An exception will be thrown if you attempt to access it otherwise.\n *\n * @returns {AI} The AI instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get ai(): " + }, + { + "kind": "Reference", + "text": "AI", + "canonicalReference": "@microsoft/teams-ai!AI:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "ai", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!Application#authentication:member", + "docComment": "/**\n * @template TState Fluent interface for accessing Authentication specific features. @description This property is only available if the Application was configured with `authentication` options. An exception will be thrown if you attempt to access it otherwise.\n *\n * @returns {AuthenticationManager} The Authentication instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get authentication(): " + }, + { + "kind": "Reference", + "text": "AuthenticationManager", + "canonicalReference": "@microsoft/teams-ai!AuthenticationManager:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "authentication", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#conversationUpdate:member(1)", + "docComment": "/**\n * Handles conversation update events.\n *\n * @param event - Name of the conversation update event to handle.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @param - {TurnContext} handler.context The context object for the turn.\n *\n * @param - {TState} handler.state The state object for the turn.\n *\n * @returns {this} The application instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "conversationUpdate(event: " + }, + { + "kind": "Reference", + "text": "ConversationUpdateEvents", + "canonicalReference": "@microsoft/teams-ai!ConversationUpdateEvents:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "conversationUpdate" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#fileConsentAccept:member(1)", + "docComment": "/**\n * Registers a handler to process when a file consent card is accepted by the user.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @returns {this} The application instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "fileConsentAccept(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, fileConsentResponse: " + }, + { + "kind": "Reference", + "text": "FileConsentCardResponse", + "canonicalReference": "botframework-schema!FileConsentCardResponse:interface" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "fileConsentAccept" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#fileConsentDecline:member(1)", + "docComment": "/**\n * Registers a handler to process when a file consent card is declined by the user.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @returns {this} The application instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "fileConsentDecline(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, fileConsentResponse: " + }, + { + "kind": "Reference", + "text": "FileConsentCardResponse", + "canonicalReference": "botframework-schema!FileConsentCardResponse:interface" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "fileConsentDecline" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#getTokenOrStartSignIn:member(1)", + "docComment": "/**\n * If the user is signed in, get the access token. If not, triggers the sign in flow for the provided authentication setting name and returns. In this case, the bot should end the turn until the sign in flow is completed. @summary Use this method to get the access token for a user that is signed in to the bot. If the user isn't signed in, this method starts the sign-in flow. The bot should end the turn in this case until the sign-in flow completes and the user is signed in.\n *\n * @param context - The context for the current turn with the user.\n *\n * @param state - The current state of the conversation.\n *\n * @param settingName - The name of the authentication setting.\n *\n * @returns {string | undefined} The token for the user if they are signed in, otherwise undefined.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getTokenOrStartSignIn(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", settingName: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "settingName", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getTokenOrStartSignIn" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!Application#meetings:member", + "docComment": "/**\n * Fluent interface for accessing Meetings specific features.\n *\n * @returns {Meetings} The Meetings instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get meetings(): " + }, + { + "kind": "Reference", + "text": "Meetings", + "canonicalReference": "@microsoft/teams-ai!~Meetings:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "meetings", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#message:member(1)", + "docComment": "/**\n * Handles incoming messages with a given keyword.\n *\n * @remarks\n *\n * This method provides a simple way to have a bot respond anytime a user sends your bot a message with a specific word or phrase.\n *\n * For example, you can easily clear the current conversation anytime a user sends \"/reset\":\n * ```JavaScript\n * bot.message('/reset', async (context, state) => {\n * await state.conversation.delete();\n * await context.sendActivity(`I have reset your state.`);\n * });\n * ```\n *\n * @param keyword - Substring of text or a regular expression to match against the text of an incoming message. An array of keywords or expression can also be passed in.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @returns {this} The application instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "message(keyword: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 17, + "endIndex": 18 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "keyword", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 10 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 16 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "message" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#messageEventUpdate:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "messageEventUpdate(event: " + }, + { + "kind": "Reference", + "text": "TeamsMessageEvents", + "canonicalReference": "@microsoft/teams-ai!TeamsMessageEvents:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "messageEventUpdate" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!Application#messageExtensions:member", + "docComment": "/**\n * Fluent interface for accessing Message Extensions' specific features.\n *\n * @returns {MessageExtensions} The MessageExtensions instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get messageExtensions(): " + }, + { + "kind": "Reference", + "text": "MessageExtensions", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "messageExtensions", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#messageReactions:member(1)", + "docComment": "/**\n * Handles message reaction events.\n *\n * @param event - Name of the message reaction event(s) to handle.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @returns {this} The application instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "messageReactions(event: " + }, + { + "kind": "Reference", + "text": "MessageReactionEvents", + "canonicalReference": "@microsoft/teams-ai!MessageReactionEvents:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "messageReactions" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#O365ConnectorCardAction:member(1)", + "docComment": "/**\n * Registers a handler to process when a O365 Connector Card Action activity is received from the user.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @returns {this} The application instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "O365ConnectorCardAction(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, query: " + }, + { + "kind": "Reference", + "text": "O365ConnectorCardActionQuery", + "canonicalReference": "botframework-schema!O365ConnectorCardActionQuery:interface" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "O365ConnectorCardAction" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!Application#options:member", + "docComment": "/**\n * The application's configured options.\n *\n * @returns {ApplicationOptions} The application's configured options.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get options(): " + }, + { + "kind": "Reference", + "text": "ApplicationOptions", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "options", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#run:member(1)", + "docComment": "/**\n * Dispatches an incoming activity to a handler registered with the application.\n *\n * @remarks\n *\n * This method should be called from your bot's \"turn handler\" (its primary message handler)\n * ```JavaScript\n * server.post('/api/messages', async (req, res) => {\n * await adapter.processActivity(req, res, async (context) => {\n * await bot.run(context);\n * });\n * });\n * ```\n *\n * @param turnContext - Context class for the current turn of conversation with the user.\n *\n * @returns {Promise} True if the activity was successfully dispatched to a handler. False if no matching handlers could be found.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "run(turnContext: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "turnContext", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "run" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#sendProactiveActivity:member(1)", + "docComment": "/**\n * Sends a proactive activity to an existing conversation the bot is a member of.\n *\n * @remarks\n *\n * This method provides a simple way to send a proactive message to a conversation the bot is a member of.\n *\n * Use of the method requires you configure the Application with the `adapter` and `botAppId` options. An exception will be thrown if either is missing.\n *\n * @param context - Context of the conversation to proactively message. This can be derived from either a TurnContext, ConversationReference, or Activity.\n *\n * @param activityOrText - Activity or message to send to the conversation.\n *\n * @param speak - Optional. Text to speak for channels that support voice.\n *\n * @param inputHint - Optional. Input hint for channels that support voice.\n *\n * @returns A Resource response containing the ID of the activity that was sent.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "sendProactiveActivity(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", activityOrText: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Activity", + "canonicalReference": "botframework-schema!Activity:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ", speak?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", inputHint?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ResourceResponse", + "canonicalReference": "botframework-schema!ResourceResponse:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 13, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "activityOrText", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "speak", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": true + }, + { + "parameterName": "inputHint", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "sendProactiveActivity" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#sendProactiveActivity:member(2)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sendProactiveActivity(conversationReference: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ConversationReference", + "canonicalReference": "botframework-schema!ConversationReference:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ", activityOrText: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Activity", + "canonicalReference": "botframework-schema!Activity:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ", speak?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", inputHint?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ResourceResponse", + "canonicalReference": "botframework-schema!ResourceResponse:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 16, + "endIndex": 20 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 2, + "parameters": [ + { + "parameterName": "conversationReference", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "activityOrText", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 11 + }, + "isOptional": false + }, + { + "parameterName": "speak", + "parameterTypeTokenRange": { + "startIndex": 12, + "endIndex": 13 + }, + "isOptional": true + }, + { + "parameterName": "inputHint", + "parameterTypeTokenRange": { + "startIndex": 14, + "endIndex": 15 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "sendProactiveActivity" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#sendProactiveActivity:member(3)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sendProactiveActivity(activity: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Activity", + "canonicalReference": "botframework-schema!Activity:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ", activityOrText: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Activity", + "canonicalReference": "botframework-schema!Activity:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ", speak?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", inputHint?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ResourceResponse", + "canonicalReference": "botframework-schema!ResourceResponse:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 16, + "endIndex": 20 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 3, + "parameters": [ + { + "parameterName": "activity", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "activityOrText", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 11 + }, + "isOptional": false + }, + { + "parameterName": "speak", + "parameterTypeTokenRange": { + "startIndex": 12, + "endIndex": 13 + }, + "isOptional": true + }, + { + "parameterName": "inputHint", + "parameterTypeTokenRange": { + "startIndex": 14, + "endIndex": 15 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "sendProactiveActivity" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#startTypingTimer:member(1)", + "docComment": "/**\n * Manually start a timer to periodically send \"typing\" activities.\n *\n * @remarks\n *\n * The timer waits 1000ms to send its initial \"typing\" activity and then send an additional \"typing\" activity every 1000ms. The timer will automatically end once an outgoing activity has been sent. If the timer is already running or the current activity, is not a \"message\" the call is ignored.\n *\n * @param context - The context for the current turn with the user.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "startTypingTimer(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "startTypingTimer" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#stopTypingTimer:member(1)", + "docComment": "/**\n * Manually stop the typing timer.\n *\n * @remarks\n *\n * If the timer isn't running nothing happens.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stopTypingTimer(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "stopTypingTimer" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!Application#taskModules:member", + "docComment": "/**\n * Fluent interface for accessing Task Module specific features.\n *\n * @returns {TaskModules} The TaskModules instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get taskModules(): " + }, + { + "kind": "Reference", + "text": "TaskModules", + "canonicalReference": "@microsoft/teams-ai!TaskModules:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "taskModules", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#teamsReadReceipt:member(1)", + "docComment": "/**\n * Adds a handler for Teams' readReceiptInfo event\n *\n * @param handler - Function to call when the event is triggered.\n *\n * @returns {this} The application instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "teamsReadReceipt(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, readReceiptInfo: " + }, + { + "kind": "Reference", + "text": "ReadReceiptInfo", + "canonicalReference": "botframework-connector!ReadReceiptInfo:class" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "teamsReadReceipt" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Application#turn:member(1)", + "docComment": "/**\n * Registers a turn event handler.\n *\n * @remarks\n *\n * Turn events let you do something before or after a turn is run. Returning false from `beforeTurn` lets you prevent the turn from running and returning false from `afterTurn` lets you prevent the bots state from being saved.\n *\n * Returning false from `beforeTurn` does result in the bots state being saved which lets you track the reason why the turn was not processed. It also means you can use `beforeTurn` as a way to call into the dialog system. For example, you could use the OAuthPrompt to sign the user in before allowing the AI system to run.\n *\n * @param event - Name of the turn event to handle.\n *\n * @param handler - Function to call when the event is triggered.\n *\n * @returns {this} The application instance for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "turn(event: " + }, + { + "kind": "Reference", + "text": "TurnEvents", + "canonicalReference": "@microsoft/teams-ai!TurnEvents:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TurnEvents", + "canonicalReference": "@microsoft/teams-ai!TurnEvents:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 13 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 11 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "turn" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!ApplicationBuilder:class", + "docComment": "/**\n * A builder class for simplifying the creation of an Application instance. @template TState Optional. Type of the turn state. This allows for strongly typed access to the turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ApplicationBuilder " + } + ], + "fileUrlPath": "src/Application.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isAbstract": false, + "name": "ApplicationBuilder", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ApplicationBuilder#build:member(1)", + "docComment": "/**\n * Builds and returns a new Application instance.\n *\n * @returns {Application} The Application instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "build(): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "build" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ApplicationBuilder#setRemoveRecipientMention:member(1)", + "docComment": "/**\n * Configures the removing of mentions of the bot's name from incoming messages. Default state for removeRecipientMention is true\n *\n * @param removeRecipientMention - The boolean for removing reciepient mentions.\n *\n * @returns {this} The ApplicationBuilder instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setRemoveRecipientMention(removeRecipientMention: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "removeRecipientMention", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setRemoveRecipientMention" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ApplicationBuilder#setStartTypingTimer:member(1)", + "docComment": "/**\n * Configures the typing timer when messages are received. Default state for startTypingTimer is true\n *\n * @param startTypingTimer - The boolean for starting the typing timer.\n *\n * @returns {this} The ApplicationBuilder instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setStartTypingTimer(startTypingTimer: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "startTypingTimer", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setStartTypingTimer" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ApplicationBuilder#withAdaptiveCardOptions:member(1)", + "docComment": "/**\n * Configures the processing of Adaptive Card requests.\n *\n * @param adaptiveCardOptions - The options for the Adaptive Cards.\n *\n * @returns {this} The ApplicationBuilder instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "withAdaptiveCardOptions(adaptiveCardOptions: " + }, + { + "kind": "Reference", + "text": "AdaptiveCardsOptions", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "adaptiveCardOptions", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "withAdaptiveCardOptions" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ApplicationBuilder#withAIOptions:member(1)", + "docComment": "/**\n * Configures the AI system to use for processing incoming messages.\n *\n * @param aiOptions - The options for the AI system.\n *\n * @returns {this} The ApplicationBuilder instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "withAIOptions(aiOptions: " + }, + { + "kind": "Reference", + "text": "AIOptions", + "canonicalReference": "@microsoft/teams-ai!AIOptions:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "aiOptions", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "withAIOptions" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ApplicationBuilder#withAuthentication:member(1)", + "docComment": "/**\n * Configures user authentication settings.\n *\n * @param adapter - The adapter to use for user authentication.\n *\n * @param authenticationOptions - The options to configure the authentication manager.\n *\n * @returns {this} The ApplicationBuilder instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "withAuthentication(adapter: " + }, + { + "kind": "Reference", + "text": "BotAdapter", + "canonicalReference": "botbuilder-core!BotAdapter:class" + }, + { + "kind": "Content", + "text": ", authenticationOptions: " + }, + { + "kind": "Reference", + "text": "AuthenticationOptions", + "canonicalReference": "@microsoft/teams-ai!AuthenticationOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "adapter", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "authenticationOptions", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "withAuthentication" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ApplicationBuilder#withLongRunningMessages:member(1)", + "docComment": "/**\n * Configures the application to use long running messages. Default state for longRunningMessages is false\n *\n * @param adapter - The adapter to use for routing incoming requests.\n *\n * @param botAppId - The Microsoft App ID for the bot.\n *\n * @returns {this} The ApplicationBuilder instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "withLongRunningMessages(adapter: " + }, + { + "kind": "Reference", + "text": "BotAdapter", + "canonicalReference": "botbuilder-core!BotAdapter:class" + }, + { + "kind": "Content", + "text": ", botAppId: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "adapter", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "botAppId", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "withLongRunningMessages" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ApplicationBuilder#withStorage:member(1)", + "docComment": "/**\n * Configures the storage system to use for storing the bot's state.\n *\n * @param storage - The storage system to use.\n *\n * @returns {this} The ApplicationBuilder instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "withStorage(storage: " + }, + { + "kind": "Reference", + "text": "Storage", + "canonicalReference": "botbuilder-core!Storage:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "storage", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "withStorage" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ApplicationBuilder#withTaskModuleOptions:member(1)", + "docComment": "/**\n * Configures the processing of Task Module requests.\n *\n * @param taskModuleOptions - The options for the Task Modules.\n *\n * @returns {this} The ApplicationBuilder instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "withTaskModuleOptions(taskModuleOptions: " + }, + { + "kind": "Reference", + "text": "TaskModulesOptions", + "canonicalReference": "@microsoft/teams-ai!TaskModulesOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "taskModuleOptions", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "withTaskModuleOptions" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ApplicationBuilder#withTurnStateFactory:member(1)", + "docComment": "/**\n * Configures the turn state factory for managing the bot's turn state.\n *\n * @param turnStateFactory - Factory used to create a custom turn state instance.\n *\n * @returns {this} The ApplicationBuilder instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "withTurnStateFactory(turnStateFactory: " + }, + { + "kind": "Content", + "text": "() => TState" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "turnStateFactory", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "withTurnStateFactory" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions:interface", + "docComment": "/**\n * Options for the Application class. @template TState Type of the turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ApplicationOptions " + } + ], + "fileUrlPath": "src/Application.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "ApplicationOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#adapter:member", + "docComment": "/**\n * Optional. Bot adapter being used.\n *\n * @remarks\n *\n * If using the `longRunningMessages` option or calling the continueConversationAsync() method, this property is required.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "adapter?: " + }, + { + "kind": "Reference", + "text": "BotAdapter", + "canonicalReference": "botbuilder-core!BotAdapter:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "adapter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#adaptiveCards:member", + "docComment": "/**\n * Optional. Options used to customize the processing of Adaptive Card requests.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "adaptiveCards?: " + }, + { + "kind": "Reference", + "text": "AdaptiveCardsOptions", + "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsOptions:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "adaptiveCards", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#ai:member", + "docComment": "/**\n * Optional. AI options to use. When provided, a new instance of the AI system will be created.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "ai?: " + }, + { + "kind": "Reference", + "text": "AIOptions", + "canonicalReference": "@microsoft/teams-ai!AIOptions:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "ai", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#authentication:member", + "docComment": "/**\n * Optional. OAuth prompt settings to use for authentication.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "authentication?: " + }, + { + "kind": "Reference", + "text": "AuthenticationOptions", + "canonicalReference": "@microsoft/teams-ai!AuthenticationOptions:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "authentication", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#botAppId:member", + "docComment": "/**\n * Optional. Application ID of the bot.\n *\n * @remarks\n *\n * If using the `longRunningMessages` option or calling the continueConversationAsync() method, this property is required.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "botAppId?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "botAppId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#fileDownloaders:member", + "docComment": "/**\n * Optional. Array of input file download plugins to use.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "fileDownloaders?: " + }, + { + "kind": "Reference", + "text": "InputFileDownloader", + "canonicalReference": "@microsoft/teams-ai!InputFileDownloader:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "fileDownloaders", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#longRunningMessages:member", + "docComment": "/**\n * Optional. If true, the bot supports long running messages that can take longer then the 10 - 15 second timeout imposed by most channels. Defaults to false.\n *\n * @remarks\n *\n * This works by immediately converting the incoming request to a proactive conversation. Care should be used for bots that operate in a shared hosting environment. The incoming request is immediately completed and many shared hosting environments will mark the bot's process as idle and shut it down.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "longRunningMessages: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "longRunningMessages", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#removeRecipientMention:member", + "docComment": "/**\n * Optional. If true, the bot will automatically remove mentions of the bot's name from incoming messages. Defaults to true.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "removeRecipientMention: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "removeRecipientMention", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#startTypingTimer:member", + "docComment": "/**\n * Optional. If true, the bot will automatically start a typing timer when messages are received. This allows the bot to automatically indicate that it's received the message and is processing the request. Defaults to true.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "startTypingTimer: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "startTypingTimer", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#storage:member", + "docComment": "/**\n * Optional. Storage provider to use for the application.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "storage?: " + }, + { + "kind": "Reference", + "text": "Storage", + "canonicalReference": "botbuilder-core!Storage:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "storage", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#taskModules:member", + "docComment": "/**\n * Optional. Options used to customize the processing of task module requests.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "taskModules?: " + }, + { + "kind": "Reference", + "text": "TaskModulesOptions", + "canonicalReference": "@microsoft/teams-ai!TaskModulesOptions:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "taskModules", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#turnStateFactory:member", + "docComment": "/**\n * Optional. Factory used to create a custom turn state instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "turnStateFactory: " + }, + { + "kind": "Content", + "text": "() => TState" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "turnStateFactory", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!AssistantMessage:class", + "docComment": "/**\n * A message sent by the assistant.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class AssistantMessage extends " + }, + { + "kind": "Reference", + "text": "TemplateSection", + "canonicalReference": "@microsoft/teams-ai!TemplateSection:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/AssistantMessage.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "AssistantMessage", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!AssistantMessage:constructor(1)", + "docComment": "/**\n * Creates a new 'AssistantMessage' instance.\n *\n * @param template - Template to use for this section.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `auto`.\n *\n * @param assistantPrefix - Optional. Prefix to use for assistant messages when rendering as text. Defaults to `assistant: `.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(template: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", assistantPrefix?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "template", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "assistantPrefix", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ] + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!Augmentation:interface", + "docComment": "/**\n * An augmentation is a component that can be added to a prompt template to add additional functionality to the prompt. @template TContent Optional. Type of message content returned for a 'success' response. The `response.message.content` field will be of type TContent. Defaults to `any`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Augmentation extends " + }, + { + "kind": "Reference", + "text": "PromptResponseValidator", + "canonicalReference": "@microsoft/teams-ai!PromptResponseValidator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/augmentations/Augmentation.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TContent", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "Augmentation", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Augmentation#createPlanFromResponse:member(1)", + "docComment": "/**\n * Creates a plan given validated response value.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param memory - An interface for accessing state variables.\n *\n * @param response - The validated and transformed response for the prompt.\n *\n * @returns The created plan.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createPlanFromResponse(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "name": "createPlanFromResponse" + }, + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Augmentation#createPromptSection:member(1)", + "docComment": "/**\n * Creates an optional prompt section for the augmentation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createPromptSection(): " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "createPromptSection" + } + ], + "extendsTokenRanges": [ + { + "startIndex": 3, + "endIndex": 5 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!AugmentationConfig:interface", + "docComment": "/**\n * Interface for the augmentation configuration portion of a prompt template.\n *\n * @remarks\n *\n * New in schema version 1.1.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AugmentationConfig " + } + ], + "fileUrlPath": "src/prompts/PromptTemplate.ts", + "releaseTag": "Public", + "name": "AugmentationConfig", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AugmentationConfig#augmentation_type:member", + "docComment": "/**\n * The type of augmentation to use.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "augmentation_type: " + }, + { + "kind": "Content", + "text": "'none' | 'sequence' | 'monologue'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "augmentation_type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AugmentationConfig#data_sources:member", + "docComment": "/**\n * Optional. List of named data sources to augment the prompt with.\n *\n * @remarks\n *\n * For each data source, the value is the max number of tokens to use from the data source.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "data_sources?: " + }, + { + "kind": "Content", + "text": "{\n [name: string]: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "data_sources", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!Authentication:class", + "docComment": "/**\n * User authentication service.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Authentication " + } + ], + "fileUrlPath": "src/authentication/Authentication.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "Authentication", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!Authentication:constructor(1)", + "docComment": "/**\n * Creates a new instance of the `Authentication` class.\n *\n * @param app - The application instance.\n *\n * @param name - The name of the connection.\n *\n * @param settings - Authentication settings.\n *\n * @param storage - A storage instance otherwise Memory Storage is used.\n *\n * @param messageExtensionsAuth - Handles message extension flow authentication.\n *\n * @param botAuth - Handles bot-flow authentication.\n *\n * @param adaptiveCardAuth - Handles adaptive card authentication.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(app: " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", settings: " + }, + { + "kind": "Reference", + "text": "OAuthSettings", + "canonicalReference": "@microsoft/teams-ai!OAuthSettings:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TeamsSsoSettings", + "canonicalReference": "@microsoft/teams-ai!~TeamsSsoSettings:interface" + }, + { + "kind": "Content", + "text": ", storage?: " + }, + { + "kind": "Reference", + "text": "Storage", + "canonicalReference": "botbuilder-core!Storage:interface" + }, + { + "kind": "Content", + "text": ", messageExtensionsAuth?: " + }, + { + "kind": "Reference", + "text": "MessageExtensionAuthenticationBase", + "canonicalReference": "@microsoft/teams-ai!~MessageExtensionAuthenticationBase:class" + }, + { + "kind": "Content", + "text": ", botAuth?: " + }, + { + "kind": "Reference", + "text": "BotAuthenticationBase", + "canonicalReference": "@microsoft/teams-ai!~BotAuthenticationBase:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", adaptiveCardAuth?: " + }, + { + "kind": "Reference", + "text": "AdaptiveCardAuthenticationBase", + "canonicalReference": "@microsoft/teams-ai!~AdaptiveCardAuthenticationBase:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "app", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "settings", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 9 + }, + "isOptional": false + }, + { + "parameterName": "storage", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": true + }, + { + "parameterName": "messageExtensionsAuth", + "parameterTypeTokenRange": { + "startIndex": 12, + "endIndex": 13 + }, + "isOptional": true + }, + { + "parameterName": "botAuth", + "parameterTypeTokenRange": { + "startIndex": 14, + "endIndex": 16 + }, + "isOptional": true + }, + { + "parameterName": "adaptiveCardAuth", + "parameterTypeTokenRange": { + "startIndex": 17, + "endIndex": 18 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Authentication#isUserSignedIn:member(1)", + "docComment": "/**\n * Check if the user is signed, if they are then return the token.\n *\n * @param context - Current turn context.\n *\n * @returns {string | undefined} The token string or undefined if the user is not signed in.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isUserSignedIn(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "isUserSignedIn" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Authentication#onUserSignInFailure:member(1)", + "docComment": "/**\n * This handler function is called when the user sign in flow fails. This only applies if sign in was initiated by the user sending a message to the bot. This handler will not be triggered if a message extension triggered the authentication flow. @template TState\n *\n * @param handler - The handler function to call when the user failed to signed in.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onUserSignInFailure(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, error: " + }, + { + "kind": "Reference", + "text": "AuthError", + "canonicalReference": "@microsoft/teams-ai!AuthError:class" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "onUserSignInFailure" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Authentication#onUserSignInSuccess:member(1)", + "docComment": "/**\n * The handler function is called when the user has successfully signed in. This only applies if sign in was initiated by the user sending a message to the bot. This handler will not be triggered if a message extension triggered the authentication flow. @template TState\n *\n * @param handler - The handler function to call when the user has successfully signed in\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "onUserSignInSuccess(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "onUserSignInSuccess" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!Authentication#settings:member", + "docComment": "/**\n * The authentication settings.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly settings: " + }, + { + "kind": "Reference", + "text": "OAuthSettings", + "canonicalReference": "@microsoft/teams-ai!OAuthSettings:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TeamsSsoSettings", + "canonicalReference": "@microsoft/teams-ai!~TeamsSsoSettings:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "settings", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Authentication#signInUser:member(1)", + "docComment": "/**\n * Signs in a user. This method will be called automatically by the Application class. @template TState\n *\n * @param context - Current turn context.\n *\n * @param state - Application state.\n *\n * @returns {string | undefined} The authentication token or undefined if the user is still login in.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "signInUser(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "signInUser" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Authentication#signOutUser:member(1)", + "docComment": "/**\n * Signs out a user. @template TState\n *\n * @param context - Current turn context.\n *\n * @param state - Application state.\n *\n * @returns {Promise} A Promise representing the asynchronous operation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "signOutUser(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "signOutUser" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!AuthenticationManager:class", + "docComment": "/**\n * The user authentication manager.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class AuthenticationManager " + } + ], + "fileUrlPath": "src/authentication/Authentication.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "AuthenticationManager", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!AuthenticationManager:constructor(1)", + "docComment": "/**\n * Creates a new instance of the `AuthenticationManager` class.\n *\n * @param app - The application instance.\n *\n * @param options - Authentication options.\n *\n * @param storage - A storage instance otherwise Memory Storage is used.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(app: " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", options: " + }, + { + "kind": "Reference", + "text": "AuthenticationOptions", + "canonicalReference": "@microsoft/teams-ai!AuthenticationOptions:interface" + }, + { + "kind": "Content", + "text": ", storage?: " + }, + { + "kind": "Reference", + "text": "Storage", + "canonicalReference": "botbuilder-core!Storage:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "app", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "storage", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": true + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AuthenticationManager#default:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly default: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "default", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AuthenticationManager#get:member(1)", + "docComment": "/**\n * @template TState Gets the authentication instance for the specified connection name.\n *\n * @param name - The setting name.\n *\n * @returns {Authentication} The authentication instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Authentication", + "canonicalReference": "@microsoft/teams-ai!Authentication:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "get" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AuthenticationManager#signOutUser:member(1)", + "docComment": "/**\n * Signs out a user. @template TState\n *\n * @param context - The turn context.\n *\n * @param state - The turn state.\n *\n * @param settingName - Optional. The name of the setting to use. If not specified, the default setting name is used.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "signOutUser(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", settingName?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "settingName", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "signOutUser" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AuthenticationManager#signUserIn:member(1)", + "docComment": "/**\n * Signs in a user. @template TState\n *\n * @param context - The turn context.\n *\n * @param state - The turn state.\n *\n * @param settingName - Optional. The name of the setting to use. If not specified, the default setting name is used.\n *\n * @returns {Promise} The sign in response.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "signUserIn(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", settingName?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "SignInResponse", + "canonicalReference": "@microsoft/teams-ai!SignInResponse:type" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "settingName", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "signUserIn" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!AuthenticationOptions:interface", + "docComment": "/**\n * The options to configure the authentication manager\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AuthenticationOptions " + } + ], + "fileUrlPath": "src/authentication/Authentication.ts", + "releaseTag": "Public", + "name": "AuthenticationOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AuthenticationOptions#autoSignIn:member", + "docComment": "/**\n * Defaults to true. Indicates whether the bot should start the sign in flow when the user sends a message to the bot or triggers a message extension. If set to false, the bot will not start the sign in flow before routing the activity to the bot logic.\n *\n * To set custom logic, set this property to the selector function.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "autoSignIn?: " + }, + { + "kind": "Content", + "text": "boolean | " + }, + { + "kind": "Reference", + "text": "Selector", + "canonicalReference": "@microsoft/teams-ai!Selector:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "autoSignIn", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AuthenticationOptions#default:member", + "docComment": "/**\n * Describes the setting the bot should use if the user does not specify a setting name.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "default?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "default", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AuthenticationOptions#settings:member", + "docComment": "/**\n * The authentication settings. Key uniquely identifies the connection string.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "settings: " + }, + { + "kind": "Content", + "text": "{\n [key: string]: " + }, + { + "kind": "Reference", + "text": "OAuthSettings", + "canonicalReference": "@microsoft/teams-ai!OAuthSettings:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TeamsSsoSettings", + "canonicalReference": "@microsoft/teams-ai!~TeamsSsoSettings:interface" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "settings", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!AuthError:class", + "docComment": "/**\n * An error thrown when an authentication error occurs.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class AuthError extends " + }, + { + "kind": "Reference", + "text": "Error", + "canonicalReference": "!Error:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/authentication/Authentication.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "AuthError", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!AuthError:constructor(1)", + "docComment": "/**\n * Creates a new instance of the `AuthError` class.\n *\n * @param message - The error message.\n *\n * @param reason - Optional. Cause of the error. Defaults to `other`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(message?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", reason?: " + }, + { + "kind": "Reference", + "text": "AuthErrorReason", + "canonicalReference": "@microsoft/teams-ai!AuthErrorReason:type" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "message", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "reason", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!AuthError#cause:member", + "docComment": "/**\n * The cause of the error.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly cause: " + }, + { + "kind": "Reference", + "text": "AuthErrorReason", + "canonicalReference": "@microsoft/teams-ai!AuthErrorReason:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "cause", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!AuthErrorReason:type", + "docComment": "/**\n * Cause of an authentication error.\n *\n * @remarks\n *\n * `invalidActivity` - The activity is not a valid activity to initiate authentication flow. `completionWithoutToken` - The authentication flow completed without a token. `other` - Other error.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type AuthErrorReason = " + }, + { + "kind": "Content", + "text": "'invalidActivity' | 'completionWithoutToken' | 'other'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/authentication/Authentication.ts", + "releaseTag": "Public", + "name": "AuthErrorReason", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator:class", + "docComment": "/**\n * An Azure OpenAI moderator that uses OpenAI's moderation API to review prompts and plans for safety.\n *\n * @remarks\n *\n * This moderation can be configured to review the input from the user, output from the model, or both. @template TState Optional. Type of the applications turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class AzureContentSafetyModerator extends " + }, + { + "kind": "Reference", + "text": "OpenAIModerator", + "canonicalReference": "@microsoft/teams-ai!OpenAIModerator:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/moderators/AzureContentSafetyModerator.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isAbstract": false, + "name": "AzureContentSafetyModerator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator:constructor(1)", + "docComment": "/**\n * Creates a new instance of the OpenAI based moderator.\n *\n * @param options - Configuration options for the moderator.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "AzureOpenAIModeratorOptions", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModeratorOptions:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator#createClient:member(1)", + "docComment": "/**\n * Creates a new instance of the Azure OpenAI client. @protected\n *\n * @param options - The options for the moderator.\n *\n * @returns {AzureOpenAIClient} The Azure OpenAI client.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected createClient(options: " + }, + { + "kind": "Reference", + "text": "OpenAIModeratorOptions", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "AzureOpenAIClient", + "canonicalReference": "@microsoft/teams-ai!~AzureOpenAIClient:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createClient" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator#createModeration:member(1)", + "docComment": "/**\n * @protected\n *\n * @param input - The input to moderate.\n *\n * @returns {Promise} The moderation results. This method is called by the moderator to moderate the input. @template TState Optional. Type of the applications turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected createModeration(input: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CreateModerationResponseResultsInner", + "canonicalReference": "@microsoft/teams-ai!~CreateModerationResponseResultsInner:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "input", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createModeration" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator#reviewInput:member(1)", + "docComment": "/**\n * Reviews an incoming prompt for safety violations.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param prompt - Generated prompt to be reviewed.\n *\n * @param options - Current options for the AI system.\n *\n * @returns An undefined value to approve the prompt or a new plan to redirect to if not approved.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "reviewInput(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "reviewInput" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator#reviewOutput:member(1)", + "docComment": "/**\n * Reviews the SAY commands generated by the planner for safety violations.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param plan - Plan generated by the planner.\n *\n * @returns The plan to execute. Either the current plan passed in for review or a new plan.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "reviewOutput(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", plan: " + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "plan", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "reviewOutput" + } + ], + "extendsTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIEmbeddingsOptions:interface", + "docComment": "/**\n * Options for configuring an `OpenAIEmbeddings` to generate embeddings using an Azure OpenAI hosted model.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AzureOpenAIEmbeddingsOptions extends " + }, + { + "kind": "Reference", + "text": "BaseOpenAIEmbeddingsOptions", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIEmbeddingsOptions:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/embeddings/OpenAIEmbeddings.ts", + "releaseTag": "Public", + "name": "AzureOpenAIEmbeddingsOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIEmbeddingsOptions#azureApiKey:member", + "docComment": "/**\n * API key to use when making requests to Azure OpenAI.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "azureApiKey: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "azureApiKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIEmbeddingsOptions#azureApiVersion:member", + "docComment": "/**\n * Optional. Version of the API being called. Defaults to `2023-05-15`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "azureApiVersion?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "azureApiVersion", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIEmbeddingsOptions#azureDeployment:member", + "docComment": "/**\n * Name of the Azure OpenAI deployment (model) to use.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "azureDeployment: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "azureDeployment", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIEmbeddingsOptions#azureEndpoint:member", + "docComment": "/**\n * Deployment endpoint to use.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "azureEndpoint: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "azureEndpoint", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModelOptions:interface", + "docComment": "/**\n * Options for configuring an `OpenAIModel` to call an Azure OpenAI hosted model.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AzureOpenAIModelOptions extends " + }, + { + "kind": "Reference", + "text": "BaseOpenAIModelOptions", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIModelOptions:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/models/OpenAIModel.ts", + "releaseTag": "Public", + "name": "AzureOpenAIModelOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModelOptions#azureApiKey:member", + "docComment": "/**\n * API key to use when making requests to Azure OpenAI.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "azureApiKey: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "azureApiKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModelOptions#azureApiVersion:member", + "docComment": "/**\n * Optional. Version of the API being called. Defaults to `2023-05-15`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "azureApiVersion?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "azureApiVersion", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModelOptions#azureDefaultDeployment:member", + "docComment": "/**\n * Default name of the Azure OpenAI deployment (model) to use.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "azureDefaultDeployment: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "azureDefaultDeployment", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModelOptions#azureEndpoint:member", + "docComment": "/**\n * Deployment endpoint to use.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "azureEndpoint: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "azureEndpoint", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModeratorOptions:interface", + "docComment": "/**\n * Options for the OpenAI based moderator.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AzureOpenAIModeratorOptions extends " + }, + { + "kind": "Reference", + "text": "OpenAIModeratorOptions", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/moderators/AzureContentSafetyModerator.ts", + "releaseTag": "Public", + "name": "AzureOpenAIModeratorOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModeratorOptions#blocklistNames:member", + "docComment": "/**\n * Text blocklist Name. Only support following characters: 0-9 A-Z a-z - . _ ~. You could attach multiple lists name here.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "blocklistNames?: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "blocklistNames", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModeratorOptions#breakByBlocklists:member", + "docComment": "/**\n * When set to true, further analyses of harmful content will not be performed in cases where blocklists are hit. When set to false, all analyses of harmful content will be performed, whether or not blocklists are hit. Default value is false.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "breakByBlocklists?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "breakByBlocklists", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModeratorOptions#categories:member", + "docComment": "/**\n * Azure OpenAI Content Safety Categories. Each category is provided with a severity level threshold from 0 to 6. If the severity level of a category is greater than or equal to the threshold, the category is flagged.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "categories?: " + }, + { + "kind": "Reference", + "text": "ContentSafetyHarmCategory", + "canonicalReference": "@microsoft/teams-ai!~ContentSafetyHarmCategory:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "categories", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIEmbeddingsOptions:interface", + "docComment": "/**\n * Base model options common to both OpenAI and Azure OpenAI services.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BaseOpenAIEmbeddingsOptions " + } + ], + "fileUrlPath": "src/embeddings/OpenAIEmbeddings.ts", + "releaseTag": "Public", + "name": "BaseOpenAIEmbeddingsOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIEmbeddingsOptions#logRequests:member", + "docComment": "/**\n * Optional. Whether to log requests to the console.\n *\n * @remarks\n *\n * This is useful for debugging prompts and defaults to `false`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "logRequests?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "logRequests", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIEmbeddingsOptions#requestConfig:member", + "docComment": "/**\n * Optional. Request options to use when calling the OpenAI API.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "requestConfig?: " + }, + { + "kind": "Reference", + "text": "AxiosRequestConfig", + "canonicalReference": "axios!AxiosRequestConfig:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "requestConfig", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIEmbeddingsOptions#retryPolicy:member", + "docComment": "/**\n * Optional. Retry policy to use when calling the OpenAI API.\n *\n * @remarks\n *\n * The default retry policy is `[2000, 5000]` which means that the first retry will be after 2 seconds and the second retry will be after 5 seconds.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "retryPolicy?: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "retryPolicy", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIModelOptions:interface", + "docComment": "/**\n * Base model options common to both OpenAI and Azure OpenAI services.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BaseOpenAIModelOptions " + } + ], + "fileUrlPath": "src/models/OpenAIModel.ts", + "releaseTag": "Public", + "name": "BaseOpenAIModelOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIModelOptions#logRequests:member", + "docComment": "/**\n * Optional. Whether to log requests to the console.\n *\n * @remarks\n *\n * This is useful for debugging prompts and defaults to `false`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "logRequests?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "logRequests", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIModelOptions#requestConfig:member", + "docComment": "/**\n * Optional. Request options to use when calling the OpenAI API.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "requestConfig?: " + }, + { + "kind": "Reference", + "text": "AxiosRequestConfig", + "canonicalReference": "axios!AxiosRequestConfig:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "requestConfig", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIModelOptions#retryPolicy:member", + "docComment": "/**\n * Optional. Retry policy to use when calling the OpenAI API.\n *\n * @remarks\n *\n * The default retry policy is `[2000, 5000]` which means that the first retry will be after 2 seconds and the second retry will be after 5 seconds.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "retryPolicy?: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "retryPolicy", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIModelOptions#useSystemMessages:member", + "docComment": "/**\n * Optional. Whether to use `system` messages when calling the OpenAI API.\n *\n * @remarks\n *\n * The current generation of models tend to follow instructions from `user` messages better then `system` messages so the default is `false`, which causes any `system` message in the prompt to be sent as `user` messages instead.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "useSystemMessages?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "useSystemMessages", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!ChatCompletionAction:interface", + "docComment": "/**\n * An action that can be called by an LLM.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ChatCompletionAction " + } + ], + "fileUrlPath": "src/models/ChatCompletionAction.ts", + "releaseTag": "Public", + "name": "ChatCompletionAction", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ChatCompletionAction#description:member", + "docComment": "/**\n * Optional. Description of what the action does.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "description?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "description", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ChatCompletionAction#name:member", + "docComment": "/**\n * Name of the action to be called.\n *\n * @remarks\n *\n * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ChatCompletionAction#parameters:member", + "docComment": "/**\n * Optional. Parameters the action accepts, described as a JSON Schema object.\n *\n * @remarks\n *\n * See [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "parameters?: " + }, + { + "kind": "Reference", + "text": "Schema", + "canonicalReference": "jsonschema!Schema:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "parameters", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig:interface", + "docComment": "/**\n * Interface for the completion configuration portion of a prompt template.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface CompletionConfig " + } + ], + "fileUrlPath": "src/prompts/PromptTemplate.ts", + "releaseTag": "Public", + "name": "CompletionConfig", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#completion_type:member", + "docComment": "/**\n * Optional. Type of completion to use. Defaults to using the completion type of the configured default model.\n *\n * @remarks\n *\n * New in schema version 1.1.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "completion_type?: " + }, + { + "kind": "Content", + "text": "'chat' | 'text'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "completion_type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#frequency_penalty:member", + "docComment": "/**\n * The models frequency_penalty as a number between 0 and 1.\n *\n * @remarks\n *\n * Defaults to 0.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "frequency_penalty: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "frequency_penalty", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#include_history:member", + "docComment": "/**\n * If true, the prompt will be augmented with the conversation history.\n *\n * @remarks\n *\n * New in schema version 1.1. Defaults to true.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "include_history: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "include_history", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#include_images:member", + "docComment": "/**\n * If true, the prompt will be augmented with any images uploaded by the user.\n *\n * @remarks\n *\n * New in schema version 1.1. Defaults to false.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "include_images: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "include_images", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#include_input:member", + "docComment": "/**\n * If true, the prompt will be augmented with the users input.\n *\n * @remarks\n *\n * New in schema version 1.1. Defaults to true.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "include_input: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "include_input", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#max_input_tokens:member", + "docComment": "/**\n * The maximum number of tokens allowed in the input.\n *\n * @remarks\n *\n * New in schema version 1.1. Defaults to 2048.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_input_tokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "max_input_tokens", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#max_tokens:member", + "docComment": "/**\n * The maximum number of tokens to generate.\n *\n * @remarks\n *\n * Defaults to 150.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_tokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "max_tokens", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#model:member", + "docComment": "/**\n * Optional. Name of the model to use otherwise the configured default model is used.\n *\n * @remarks\n *\n * New in schema version 1.1.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "model?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "model", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#presence_penalty:member", + "docComment": "/**\n * The models presence_penalty as a number between 0 and 1.\n *\n * @remarks\n *\n * Defaults to 0.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "presence_penalty: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "presence_penalty", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#stop_sequences:member", + "docComment": "/**\n * Optional. Array of stop sequences that when hit will stop generation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stop_sequences?: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "stop_sequences", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#temperature:member", + "docComment": "/**\n * The models temperature as a number between 0 and 2.\n *\n * @remarks\n *\n * Defaults to 0.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "temperature: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "temperature", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig#top_p:member", + "docComment": "/**\n * The models top_p as a number between 0 and 2.\n *\n * @remarks\n *\n * Defaults to 0.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "top_p: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "top_p", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions:interface", + "docComment": "/**\n * The configured options for the AI system after all defaults have been applied. @template TState Type of the turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ConfiguredAIOptions " + } + ], + "fileUrlPath": "src/AI.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "ConfiguredAIOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions#allow_looping:member", + "docComment": "/**\n * If true, the AI system will allow the planner to loop.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "allow_looping: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "allow_looping", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions#max_steps:member", + "docComment": "/**\n * Maximum number of actions to execute in a single turn.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_steps: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "max_steps", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions#max_time:member", + "docComment": "/**\n * Maximum amount of time to spend executing a single turn in milliseconds.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_time: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "max_time", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions#moderator:member", + "docComment": "/**\n * The moderator being used for moderating input passed to the model and the output\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "moderator: " + }, + { + "kind": "Reference", + "text": "Moderator", + "canonicalReference": "@microsoft/teams-ai!Moderator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "moderator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions#planner:member", + "docComment": "/**\n * The planner being used for generating plans.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "planner: " + }, + { + "kind": "Reference", + "text": "Planner", + "canonicalReference": "@microsoft/teams-ai!Planner:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "planner", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!ConfiguredLLMClientOptions:interface", + "docComment": "/**\n * The configuration of the LLMClient instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ConfiguredLLMClientOptions " + } + ], + "fileUrlPath": "src/planners/LLMClient.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TContent", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "ConfiguredLLMClientOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredLLMClientOptions#history_variable:member", + "docComment": "/**\n * Memory variable used for storing conversation history.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "history_variable: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "history_variable", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredLLMClientOptions#input_variable:member", + "docComment": "/**\n * Memory variable used for storing the users input message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "input_variable: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "input_variable", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredLLMClientOptions#logRepairs:member", + "docComment": "/**\n * If true, any repair attempts will be logged to the console.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "logRepairs: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "logRepairs", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredLLMClientOptions#max_history_messages:member", + "docComment": "/**\n * Maximum number of conversation history messages that will be persisted to memory.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_history_messages: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "max_history_messages", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredLLMClientOptions#max_repair_attempts:member", + "docComment": "/**\n * Maximum number of automatic repair attempts that will be made.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_repair_attempts: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "max_repair_attempts", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredLLMClientOptions#model:member", + "docComment": "/**\n * AI model used for completing prompts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "model: " + }, + { + "kind": "Reference", + "text": "PromptCompletionModel", + "canonicalReference": "@microsoft/teams-ai!PromptCompletionModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "model", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredLLMClientOptions#template:member", + "docComment": "/**\n * Prompt used for the conversation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "template: " + }, + { + "kind": "Reference", + "text": "PromptTemplate", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "template", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredLLMClientOptions#tokenizer:member", + "docComment": "/**\n * Tokenizer used when rendering the prompt or counting tokens.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "tokenizer", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredLLMClientOptions#validator:member", + "docComment": "/**\n * Response validator used when completing prompts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validator: " + }, + { + "kind": "Reference", + "text": "PromptResponseValidator", + "canonicalReference": "@microsoft/teams-ai!PromptResponseValidator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "validator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!ConfiguredPromptManagerOptions:interface", + "docComment": "/**\n * The configured PromptManager options.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ConfiguredPromptManagerOptions " + } + ], + "fileUrlPath": "src/prompts/PromptManager.ts", + "releaseTag": "Public", + "name": "ConfiguredPromptManagerOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredPromptManagerOptions#max_conversation_history_tokens:member", + "docComment": "/**\n * Maximum number of tokens to of conversation history to include in prompts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_conversation_history_tokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "max_conversation_history_tokens", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredPromptManagerOptions#max_history_messages:member", + "docComment": "/**\n * Maximum number of messages to use when rendering conversation_history.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_history_messages: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "max_history_messages", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredPromptManagerOptions#max_input_tokens:member", + "docComment": "/**\n * Maximum number of tokens user input to include in prompts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_input_tokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "max_input_tokens", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredPromptManagerOptions#promptsFolder:member", + "docComment": "/**\n * Path to the filesystem folder containing all the applications prompts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "promptsFolder: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "promptsFolder", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ConfiguredPromptManagerOptions#role:member", + "docComment": "/**\n * Message role to use for loaded prompts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "role: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "role", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!ConversationHistory:class", + "docComment": "/**\n * A section that renders the conversation history.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ConversationHistory extends " + }, + { + "kind": "Reference", + "text": "PromptSectionBase", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/ConversationHistory.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "ConversationHistory", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!ConversationHistory:constructor(1)", + "docComment": "/**\n * Creates a new 'ConversationHistory' instance.\n *\n * @param variable - Name of memory variable used to store the histories `Message[]`.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `proportional` with a value of `1.0`.\n *\n * @param required - Optional. Indicates if this section is required. Defaults to `false`.\n *\n * @param userPrefix - Optional. Prefix to use for user messages when rendering as text. Defaults to `user: `.\n *\n * @param assistantPrefix - Optional. Prefix to use for assistant messages when rendering as text. Defaults to `assistant: `.\n *\n * @param separator - \n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(variable: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", required?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ", userPrefix?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", assistantPrefix?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", separator?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "variable", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "required", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + }, + { + "parameterName": "userPrefix", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + }, + { + "parameterName": "assistantPrefix", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": true + }, + { + "parameterName": "separator", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "isOptional": true + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!ConversationHistory#assistantPrefix:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly assistantPrefix: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "assistantPrefix", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ConversationHistory#renderAsMessages:member(1)", + "docComment": "/**\n * @param context - \n *\n * @param memory - \n *\n * @param functions - \n *\n * @param tokenizer - \n *\n * @param maxTokens - @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsMessages" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!ConversationHistory#renderAsText:member(1)", + "docComment": "/**\n * @param context - \n *\n * @param memory - \n *\n * @param functions - \n *\n * @param tokenizer - \n *\n * @param maxTokens - @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsText(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 15 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsText" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!ConversationHistory#userPrefix:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly userPrefix: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "userPrefix", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!ConversationHistory#variable:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly variable: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "variable", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!ConversationUpdateEvents:type", + "docComment": "/**\n * Conversation update events.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type ConversationUpdateEvents = " + }, + { + "kind": "Content", + "text": "'channelCreated' | 'channelRenamed' | 'channelDeleted' | 'channelRestored' | 'membersAdded' | 'membersRemoved' | 'teamRenamed' | 'teamDeleted' | 'teamHardDeleted' | 'teamArchived' | 'teamUnarchived' | 'teamRestored' | 'topicName' | 'historyDisclosed'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/Application.ts", + "releaseTag": "Public", + "name": "ConversationUpdateEvents", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!DataSource:interface", + "docComment": "/**\n * A data source that can be used to render text that's added to a prompt.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface DataSource " + } + ], + "fileUrlPath": "src/dataSources/DataSource.ts", + "releaseTag": "Public", + "name": "DataSource", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!DataSource#name:member", + "docComment": "/**\n * Name of the data source.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!DataSource#renderData:member(1)", + "docComment": "/**\n * Renders the data source as a string of text.\n *\n * @param context - Turn context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param tokenizer - Tokenizer to use when rendering the data source.\n *\n * @param maxTokens - Maximum number of tokens allowed to be rendered.\n *\n * @returns The text to inject into the prompt as a `RenderedPromptSection` object.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderData(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 13 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + } + ], + "name": "renderData" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!DataSourceSection:class", + "docComment": "/**\n * A section that renders a data source to a prompt.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class DataSourceSection extends " + }, + { + "kind": "Reference", + "text": "PromptSectionBase", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/DataSourceSection.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "DataSourceSection", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!DataSourceSection:constructor(1)", + "docComment": "/**\n * Creates a new `DataSourceSection` instance.\n *\n * @param dataSource - The data source to render.\n *\n * @param tokens - Desired number of tokens to render.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(dataSource: " + }, + { + "kind": "Reference", + "text": "DataSource", + "canonicalReference": "@microsoft/teams-ai!DataSource:interface" + }, + { + "kind": "Content", + "text": ", tokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "dataSource", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!DataSourceSection#renderAsMessages:member(1)", + "docComment": "/**\n * @param context - \n *\n * @param memory - \n *\n * @param functions - \n *\n * @param tokenizer - \n *\n * @param maxTokens - @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsMessages" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!DefaultAugmentation:class", + "docComment": "/**\n * The default 'none' augmentation.\n *\n * @remarks\n *\n * This augmentation does not add any additional functionality to the prompt. It always returns a `Plan` with a single `SAY` command containing the models response.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class DefaultAugmentation implements " + }, + { + "kind": "Reference", + "text": "Augmentation", + "canonicalReference": "@microsoft/teams-ai!Augmentation:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/augmentations/DefaultAugmentation.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "DefaultAugmentation", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!DefaultAugmentation#createPlanFromResponse:member(1)", + "docComment": "/**\n * Creates a plan given validated response value.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param memory - An interface for accessing state variables.\n *\n * @param response - The validated and transformed response for the prompt.\n *\n * @returns The created plan.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createPlanFromResponse(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createPlanFromResponse" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!DefaultAugmentation#createPromptSection:member(1)", + "docComment": "/**\n * Creates an optional prompt section for the augmentation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createPromptSection(): " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "createPromptSection" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!DefaultAugmentation#validateResponse:member(1)", + "docComment": "/**\n * Validates a response to a prompt.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param tokenizer - Tokenizer to use for encoding and decoding text.\n *\n * @param response - Response to validate.\n *\n * @param remaining_attempts - Number of remaining attempts to validate the response.\n *\n * @returns A `Validation` object.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateResponse(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", remaining_attempts: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Validation", + "canonicalReference": "@microsoft/teams-ai!Validation:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 16 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "isOptional": false + }, + { + "parameterName": "remaining_attempts", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateResponse" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 3 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!DefaultConversationState:interface", + "docComment": "/**\n * Default conversation state\n *\n * @remarks\n *\n * Inherit a new interface from this base interface to strongly type the applications conversation state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface DefaultConversationState " + } + ], + "fileUrlPath": "src/TurnState.ts", + "releaseTag": "Public", + "name": "DefaultConversationState", + "preserveMemberOrder": false, + "members": [], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!DefaultModerator:class", + "docComment": "/**\n * Default moderator created by the AI system if one isn't configured.\n *\n * @remarks\n *\n * The default moderator is a pass-through and always approves all inputs and outputs. @template TState Optional. The Application's turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class DefaultModerator implements " + }, + { + "kind": "Reference", + "text": "Moderator", + "canonicalReference": "@microsoft/teams-ai!Moderator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/moderators/DefaultModerator.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isAbstract": false, + "name": "DefaultModerator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!DefaultModerator#reviewInput:member(1)", + "docComment": "/**\n * Allows all prompts by returning undefined.\n *\n * @param context - The context object for the turn.\n *\n * @param state - The current turn state.\n *\n * @returns A promise that resolves to undefined.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "reviewInput(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "reviewInput" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!DefaultModerator#reviewOutput:member(1)", + "docComment": "/**\n * Allows all plans by returning the plan as-is.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param plan - Plan generated by the planner.\n *\n * @returns A promise that resolves to the plan.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "reviewOutput(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", plan: " + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "plan", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "reviewOutput" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 5, + "endIndex": 7 + } + ] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!DefaultResponseValidator:class", + "docComment": "/**\n * Default response validator that always returns true. @template TValue Optional. Type of the validation value returned. Defaults to `any`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class DefaultResponseValidator implements " + }, + { + "kind": "Reference", + "text": "PromptResponseValidator", + "canonicalReference": "@microsoft/teams-ai!PromptResponseValidator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/validators/DefaultResponseValidator.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TValue", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "isAbstract": false, + "name": "DefaultResponseValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!DefaultResponseValidator#validateResponse:member(1)", + "docComment": "/**\n * Validates a response to a prompt.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param tokenizer - Tokenizer to use for encoding and decoding text.\n *\n * @param response - Response to validate.\n *\n * @param remaining_attempts - Number of remaining attempts to validate the response.\n *\n * @returns {PromptResponseValidator} A `Validation` object.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateResponse(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", remaining_attempts: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Validation", + "canonicalReference": "@microsoft/teams-ai!Validation:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 16 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "isOptional": false + }, + { + "parameterName": "remaining_attempts", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateResponse" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 3, + "endIndex": 5 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!DefaultTempState:interface", + "docComment": "/**\n * Default temp state\n *\n * @remarks\n *\n * Inherit a new interface from this base interface to strongly type the applications temp state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface DefaultTempState " + } + ], + "fileUrlPath": "src/TurnState.ts", + "releaseTag": "Public", + "name": "DefaultTempState", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!DefaultTempState#actionOutputs:member", + "docComment": "/**\n * All outputs returned from the action sequence that was executed\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "actionOutputs: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "actionOutputs", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!DefaultTempState#authTokens:member", + "docComment": "/**\n * User authentication tokens\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "authTokens: " + }, + { + "kind": "Content", + "text": "{\n [key: string]: string;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "authTokens", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!DefaultTempState#duplicateTokenExchange:member", + "docComment": "/**\n * Flag indicating whether a token exchange event has already been processed\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "duplicateTokenExchange?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "duplicateTokenExchange", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!DefaultTempState#input:member", + "docComment": "/**\n * Input passed from the user to the AI Library\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "input: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "input", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!DefaultTempState#inputFiles:member", + "docComment": "/**\n * Downloaded files passed by the user to the AI Library\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "inputFiles: " + }, + { + "kind": "Reference", + "text": "InputFile", + "canonicalReference": "@microsoft/teams-ai!InputFile:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "inputFiles", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!DefaultTempState#lastOutput:member", + "docComment": "/**\n * Output returned from the last executed action\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "lastOutput: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "lastOutput", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!DefaultUserState:interface", + "docComment": "/**\n * Default user state\n *\n * @remarks\n *\n * Inherit a new interface from this base interface to strongly type the applications user state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface DefaultUserState " + } + ], + "fileUrlPath": "src/TurnState.ts", + "releaseTag": "Public", + "name": "DefaultUserState", + "preserveMemberOrder": false, + "members": [], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!EmbeddingsModel:interface", + "docComment": "/**\n * An AI model that can be used to create embeddings.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface EmbeddingsModel " + } + ], + "fileUrlPath": "src/embeddings/EmbeddingsModel.ts", + "releaseTag": "Public", + "name": "EmbeddingsModel", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!EmbeddingsModel#createEmbeddings:member(1)", + "docComment": "/**\n * Creates embeddings for the given inputs.\n *\n * @param model - Name of the model to use (or deployment for Azure).\n *\n * @param inputs - Text inputs to create embeddings for.\n *\n * @returns A `EmbeddingsResponse` with a status and the generated embeddings or a message when an error occurs.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createEmbeddings(model: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", inputs: " + }, + { + "kind": "Content", + "text": "string | string[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "EmbeddingsResponse", + "canonicalReference": "@microsoft/teams-ai!EmbeddingsResponse:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "model", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "inputs", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "createEmbeddings" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!EmbeddingsResponse:interface", + "docComment": "/**\n * Response returned by a `EmbeddingsClient`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface EmbeddingsResponse " + } + ], + "fileUrlPath": "src/embeddings/EmbeddingsModel.ts", + "releaseTag": "Public", + "name": "EmbeddingsResponse", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!EmbeddingsResponse#message:member", + "docComment": "/**\n * Optional. Message when status is not equal to `success`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "message?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "message", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!EmbeddingsResponse#output:member", + "docComment": "/**\n * Optional. Embeddings for the given inputs.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "output?: " + }, + { + "kind": "Content", + "text": "number[][]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "output", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!EmbeddingsResponse#status:member", + "docComment": "/**\n * Status of the embeddings response.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "status: " + }, + { + "kind": "Reference", + "text": "EmbeddingsResponseStatus", + "canonicalReference": "@microsoft/teams-ai!EmbeddingsResponseStatus:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "status", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!EmbeddingsResponseStatus:type", + "docComment": "/**\n * Status of the embeddings response.\n *\n * @remarks\n *\n * `success` - The embeddings were successfully created. `error` - An error occurred while creating the embeddings. `rate_limited` - The request was rate limited.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type EmbeddingsResponseStatus = " + }, + { + "kind": "Content", + "text": "'success' | 'error' | 'rate_limited'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/embeddings/EmbeddingsModel.ts", + "releaseTag": "Public", + "name": "EmbeddingsResponseStatus", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!FunctionCall:interface", + "docComment": "/**\n * A named function to call.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface FunctionCall " + } + ], + "fileUrlPath": "src/prompts/Message.ts", + "releaseTag": "Public", + "name": "FunctionCall", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!FunctionCall#arguments:member", + "docComment": "/**\n * Optional. Arguments to pass to the function. Must be deserialized.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "arguments?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "arguments", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!FunctionCall#name:member", + "docComment": "/**\n * Name of the function to call.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "name?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!FunctionCallMessage:class", + "docComment": "/**\n * An `assistant` message containing a function to call.\n *\n * @remarks\n *\n * The function call information is returned by the model so we use an \"assistant\" message to represent it in conversation history.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class FunctionCallMessage extends " + }, + { + "kind": "Reference", + "text": "PromptSectionBase", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/FunctionCallMessage.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "FunctionCallMessage", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!FunctionCallMessage:constructor(1)", + "docComment": "/**\n * Creates a new 'FunctionCallMessage' instance.\n *\n * @param function_call - name and arguments of the function to call.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `auto`.\n *\n * @param assistantPrefix - Optional. Prefix to use for assistant messages when rendering as text. Defaults to `assistant: `.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(function_call: " + }, + { + "kind": "Reference", + "text": "FunctionCall", + "canonicalReference": "@microsoft/teams-ai!FunctionCall:interface" + }, + { + "kind": "Content", + "text": ", tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", assistantPrefix?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "function_call", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "assistantPrefix", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!FunctionCallMessage#function_call:member", + "docComment": "/**\n * Name and arguments of the function to call.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly function_call: " + }, + { + "kind": "Reference", + "text": "FunctionCall", + "canonicalReference": "@microsoft/teams-ai!FunctionCall:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "function_call", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!FunctionCallMessage#renderAsMessages:member(1)", + "docComment": "/**\n * @param context - \n *\n * @param memory - \n *\n * @param functions - \n *\n * @param tokenizer - \n *\n * @param maxTokens - @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsMessages" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!FunctionResponseMessage:class", + "docComment": "/**\n * Message containing the response to a function call.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class FunctionResponseMessage extends " + }, + { + "kind": "Reference", + "text": "PromptSectionBase", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/FunctionResponseMessage.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "FunctionResponseMessage", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!FunctionResponseMessage:constructor(1)", + "docComment": "/**\n * Creates a new 'FunctionResponseMessage' instance.\n *\n * @param name - Name of the function that was called.\n *\n * @param response - The response returned by the called function.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `auto`.\n *\n * @param functionPrefix - Optional. Prefix to use for function messages when rendering as text. Defaults to `user: ` to simulate the response coming from the user.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ", tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", functionPrefix?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + }, + { + "parameterName": "functionPrefix", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!FunctionResponseMessage#name:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!FunctionResponseMessage#renderAsMessages:member(1)", + "docComment": "/**\n * @param context - \n *\n * @param memory - \n *\n * @param functions - \n *\n * @param tokenizer - \n *\n * @param maxTokens - @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsMessages" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!FunctionResponseMessage#response:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly response: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "response", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!GPT3Tokenizer:class", + "docComment": "/**\n * Tokenizer that uses GPT-3's encoder.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class GPT3Tokenizer implements " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/tokenizers/GPT3Tokenizer.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "GPT3Tokenizer", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!GPT3Tokenizer#decode:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "decode(tokens: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "decode" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!GPT3Tokenizer#encode:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "encode(text: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "text", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "encode" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!GroupSection:class", + "docComment": "/**\n * A group of sections that will rendered as a single message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class GroupSection extends " + }, + { + "kind": "Reference", + "text": "PromptSectionBase", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/GroupSection.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "GroupSection", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!GroupSection:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `GroupSection` class\n *\n * @param sections - List of sections to group together.\n *\n * @param role - Optional. Message role to use for this section. Defaults to `system`.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `auto`.\n *\n * @param required - Optional. Indicates if this section is required. Defaults to `true`.\n *\n * @param separator - Optional. Separator to use between sections when rendering as text. Defaults to `\\n\\n`.\n *\n * @param textPrefix - Optional. Prefix to use for text output. Defaults to `undefined`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(sections: " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", role?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", required?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ", separator?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", textPrefix?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "sections", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "role", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": true + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": true + }, + { + "parameterName": "required", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": true + }, + { + "parameterName": "separator", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": true + }, + { + "parameterName": "textPrefix", + "parameterTypeTokenRange": { + "startIndex": 12, + "endIndex": 13 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!GroupSection#renderAsMessages:member(1)", + "docComment": "/**\n * @param context - \n *\n * @param memory - \n *\n * @param functions - \n *\n * @param tokenizer - \n *\n * @param maxTokens - @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsMessages" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!GroupSection#role:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly role: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "role", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!GroupSection#sections:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly sections: " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "sections", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!ImageContentPart:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ImageContentPart " + } + ], + "fileUrlPath": "src/prompts/Message.ts", + "releaseTag": "Public", + "name": "ImageContentPart", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ImageContentPart#image_url:member", + "docComment": "/**\n * The URL of the image.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "image_url: " + }, + { + "kind": "Content", + "text": "string | {\n url: string;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "image_url", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ImageContentPart#type:member", + "docComment": "/**\n * Type of the message content. Should always be 'image_url'.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "'image_url'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!InnerMonologue:interface", + "docComment": "/**\n * Structure used to track the inner monologue of an LLM.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface InnerMonologue " + } + ], + "fileUrlPath": "src/augmentations/MonologueAugmentation.ts", + "releaseTag": "Public", + "name": "InnerMonologue", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!InnerMonologue#action:member", + "docComment": "/**\n * The next action to perform.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "action: " + }, + { + "kind": "Content", + "text": "{\n name: string;\n parameters?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": ";\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "action", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!InnerMonologue#thoughts:member", + "docComment": "/**\n * The LLM's thoughts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "thoughts: " + }, + { + "kind": "Content", + "text": "{\n thought: string;\n reasoning: string;\n plan: string;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "thoughts", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "@microsoft/teams-ai!InnerMonologueSchema:var", + "docComment": "/**\n * JSON schema for validating an `InnerMonologue`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "InnerMonologueSchema: " + }, + { + "kind": "Reference", + "text": "Schema", + "canonicalReference": "jsonschema!Schema:interface" + } + ], + "fileUrlPath": "src/augmentations/MonologueAugmentation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "InnerMonologueSchema", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!InputFile:interface", + "docComment": "/**\n * A file sent by the user to the bot.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface InputFile " + } + ], + "fileUrlPath": "src/InputFileDownloader.ts", + "releaseTag": "Public", + "name": "InputFile", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!InputFile#content:member", + "docComment": "/**\n * The downloaded content of the file.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "content: " + }, + { + "kind": "Reference", + "text": "Buffer", + "canonicalReference": "!\"\\\"buffer\\\"\".__global.Buffer:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "content", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!InputFile#contentType:member", + "docComment": "/**\n * The content type of the file.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "contentType: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "contentType", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!InputFile#contentUrl:member", + "docComment": "/**\n * Optional. URL to the content of the file.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "contentUrl?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "contentUrl", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!InputFileDownloader:interface", + "docComment": "/**\n * A plugin responsible for downloading files relative to the current user's input. @template TState Optional. Type of application state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface InputFileDownloader " + } + ], + "fileUrlPath": "src/InputFileDownloader.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "name": "InputFileDownloader", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!InputFileDownloader#downloadFiles:member(1)", + "docComment": "/**\n * Download any files relative to the current user's input.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "downloadFiles(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "InputFile", + "canonicalReference": "@microsoft/teams-ai!InputFile:interface" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "downloadFiles" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!JSONResponseValidator:class", + "docComment": "/**\n * Parses any JSON returned by the model and optionally verifies it against a JSON schema. @template TValue Optional. Type of the validation value returned. Defaults to `Record`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class JSONResponseValidator" + }, + { + "kind": "Content", + "text": "> implements " + }, + { + "kind": "Reference", + "text": "PromptResponseValidator", + "canonicalReference": "@microsoft/teams-ai!PromptResponseValidator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/validators/JSONResponseValidator.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TValue", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "isAbstract": false, + "name": "JSONResponseValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!JSONResponseValidator:constructor(1)", + "docComment": "/**\n * Creates a new `JSONResponseValidator` instance.\n *\n * @param schema - Optional. JSON schema to validate the response against.\n *\n * @param missingJsonFeedback - Optional. Custom feedback to give when no JSON is returned.\n *\n * @param errorFeedback - Optional. Custom feedback prefix to use when schema errors are detected.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(schema?: " + }, + { + "kind": "Reference", + "text": "Schema", + "canonicalReference": "jsonschema!Schema:interface" + }, + { + "kind": "Content", + "text": ", missingJsonFeedback?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", errorFeedback?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "schema", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "missingJsonFeedback", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "errorFeedback", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!JSONResponseValidator#errorFeedback:member", + "docComment": "/**\n * Feedback prefix given when schema errors are detected.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "errorFeedback: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "errorFeedback", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!JSONResponseValidator#instanceName:member", + "docComment": "/**\n * Optional. Substitution for the word \"instance\" to use in feedback messages.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "instanceName?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "instanceName", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!JSONResponseValidator#missingJsonFeedback:member", + "docComment": "/**\n * Feedback given when no JSON is returned.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "missingJsonFeedback: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "missingJsonFeedback", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!JSONResponseValidator#schema:member", + "docComment": "/**\n * JSON schema to validate the response against.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly schema?: " + }, + { + "kind": "Reference", + "text": "Schema", + "canonicalReference": "jsonschema!Schema:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": true, + "releaseTag": "Public", + "name": "schema", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!JSONResponseValidator#validateResponse:member(1)", + "docComment": "/**\n * Validates a response to a prompt.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param tokenizer - Tokenizer to use for encoding and decoding text.\n *\n * @param response - Response to validate.\n *\n * @param remaining_attempts - Number of remaining attempts to validate the response.\n *\n * @returns {Promise>} A `Validation` object.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateResponse(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", remaining_attempts: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Validation", + "canonicalReference": "@microsoft/teams-ai!Validation:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 16 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "isOptional": false + }, + { + "parameterName": "remaining_attempts", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateResponse" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 4, + "endIndex": 6 + } + ] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!LayoutEngine:class", + "docComment": "/**\n * Base layout engine that renders a set of `auto`, `fixed`, or `proportional` length sections.\n *\n * @remarks\n *\n * This class is used internally by the `Prompt` and `GroupSection` classes to render their sections.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class LayoutEngine implements " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/LayoutEngine.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "LayoutEngine", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!LayoutEngine:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `LayoutEngine` class\n *\n * @param sections - List of sections to layout.\n *\n * @param tokens - Sizing strategy for this section.\n *\n * @param required - Indicates if this section is required.\n *\n * @param separator - Separator to use between sections when rendering as text.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(sections: " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", tokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", required: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ", separator: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "sections", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "required", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "separator", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!LayoutEngine#renderAsMessages:member(1)", + "docComment": "/**\n * @private\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param memory - The current memory.\n *\n * @param functions - The functions available to use in the prompt.\n *\n * @param tokenizer - Tokenizer to use when rendering as text.\n *\n * @param maxTokens - Maximum number of tokens allowed.\n *\n * @returns {Promise>} Rendered section.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsMessages" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!LayoutEngine#renderAsText:member(1)", + "docComment": "/**\n * @private\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param memory - The current memory.\n *\n * @param functions - The functions available to use in the prompt.\n *\n * @param tokenizer - Tokenizer to use when rendering as text.\n *\n * @param maxTokens - Maximum number of tokens allowed.\n *\n * @returns {Promise>} Rendered section.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsText(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 15 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsText" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!LayoutEngine#required:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly required: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "required", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!LayoutEngine#sections:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly sections: " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "sections", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!LayoutEngine#separator:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly separator: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "separator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!LayoutEngine#tokens:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly tokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "tokens", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!LLMClient:class", + "docComment": "/**\n * LLMClient class that's used to complete prompts.\n *\n * @remarks\n *\n * Each wave, at a minimum needs to be configured with a `client`, `prompt`, and `prompt_options`.\n *\n * Configuring the wave to use a `validator` is optional but recommended. The primary benefit to using LLMClient is it's response validation and automatic response repair features. The validator acts as guard and guarantees that you never get an malformed response back from the model. At least not without it being flagged as an `invalid_response`.\n *\n * Using the `JSONResponseValidator`, for example, guarantees that you only ever get a valid object back from `completePrompt()`. In fact, you'll get back a fully parsed object and any additional response text from the model will be dropped. If you give the `JSONResponseValidator` a JSON Schema, you will get back a strongly typed and validated instance of an object in the returned `response.message.content`.\n *\n * When a validator detects a bad response from the model, it gives the model \"feedback\" as to the problem it detected with its response and more importantly an instruction that tells the model how it should repair the problem. This puts the wave into a special repair mode where it first forks the memory for the conversation and then has a side conversation with the model in an effort to get it to repair its response. By forking the conversation, this isolates the bad response and prevents it from contaminating the main conversation history. If the response can be repaired, the wave will un-fork the memory and use the repaired response in place of the original bad response. To the model it's as if it never made a mistake which is important for future turns with the model. If the response can't be repaired, a response status of `invalid_response` will be returned.\n *\n * When using a well designed validator, like the `JSONResponseValidator`, the wave can typically repair a bad response in a single additional model call. Sometimes it takes a couple of calls to effect a repair and occasionally it won't be able to repair it at all. If your prompt is well designed and you only occasionally see failed repair attempts, I'd recommend just calling the wave a second time. Given the stochastic nature of these models, there's a decent chance it won't make the same mistake on the second call. A well designed prompt coupled with a well designed validator should get the reliability of calling these models somewhere close to 99% reliable.\n *\n * This \"feedback\" technique works with all the GPT-3 generation of models and I've tested it with `text-davinci-003`, `gpt-3.5-turbo`, and `gpt-4`. There's a good chance it will work with other open source models like `LLaMA` and Googles `Bard` but I have yet to test it with those models.\n *\n * LLMClient supports OpenAI's functions feature and can validate the models response against the schema for the supported functions. When an LLMClient is configured with both a `OpenAIModel` and a `FunctionResponseValidator`, the model will be cloned and configured to send the validators configured list of functions with the request. There's no need to separately configure the models `functions` list, but if you do, the models functions list will be sent instead. @template TContent Optional. Type of message content returned for a 'success' response. The `response.message.content` field will be of type TContent. Defaults to `any`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class LLMClient " + } + ], + "fileUrlPath": "src/planners/LLMClient.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TContent", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "isAbstract": false, + "name": "LLMClient", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!LLMClient:constructor(1)", + "docComment": "/**\n * Creates a new `LLMClient` instance.\n *\n * @param options - Options to configure the instance with.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "LLMClientOptions", + "canonicalReference": "@microsoft/teams-ai!LLMClientOptions:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!LLMClient#addFunctionResultToHistory:member(1)", + "docComment": "/**\n * Adds a result from a `function_call` to the history.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param name - Name of the function that was called.\n *\n * @param results - Results returned by the function.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "addFunctionResultToHistory(memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", results: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "results", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "addFunctionResultToHistory" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!LLMClient#completePrompt:member(1)", + "docComment": "/**\n * Completes a prompt.\n *\n * @remarks\n *\n * The `input` parameter is optional but if passed in, will be assigned to memory using the configured `input_variable`. If it's not passed in an attempt will be made to read it from memory so passing it in or assigning to memory works. In either case, the `input` variable is only used when constructing a user message that, will be added to the conversation history and formatted like `{ role: 'user', content: input }`.\n *\n * It's important to note that if you want the users input sent to the model as part of the prompt, you will need to add a `UserMessage` section to your prompt. The wave does not do anything to modify your prompt, except when performing repairs and those changes are temporary.\n *\n * When the model successfully returns a valid (or repaired) response, a 'user' message (if input was detected) and 'assistant' message will be automatically added to the conversation history. You can disable that behavior by setting `max_history_messages` to `0`.\n *\n * The response returned by `completePrompt()` will be strongly typed by the validator you're using. The `DefaultResponseValidator` returns a `string` and the `JSONResponseValidator` will return either an `object` or if a JSON Schema is provided, an instance of `TContent`. When using a custom validator, the validator is return any type of content it likes.\n *\n * A successful response is indicated by `response.status == 'success'` and the content can be accessed via `response.message.content`. If a response is invalid it will have a `response.status == 'invalid_response'` and the `response.message` will be a string containing the validator feedback message. There are other status codes for various errors and in all cases except `success` the `response.message` will be of type `string`. @template TContent Optional. Type of message content returned for a 'success' response. The `response.message.content` field will be of type TContent. Defaults to `any`.\n *\n * @param context - Current turn context.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param functions - Functions to use when rendering the prompt.\n *\n * @returns A `PromptResponse` with the status and message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "completePrompt(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "completePrompt" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!LLMClient#options:member", + "docComment": "/**\n * Configured options for this LLMClient instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly options: " + }, + { + "kind": "Reference", + "text": "ConfiguredLLMClientOptions", + "canonicalReference": "@microsoft/teams-ai!ConfiguredLLMClientOptions:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "options", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!LLMClientOptions:interface", + "docComment": "/**\n * Options for an LLMClient instance. @template TContent Optional. Type of message content returned for a 'success' response. The `response.message.content` field will be of type TContent. Defaults to `any`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface LLMClientOptions " + } + ], + "fileUrlPath": "src/planners/LLMClient.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TContent", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "LLMClientOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!LLMClientOptions#history_variable:member", + "docComment": "/**\n * Optional. Memory variable used for storing conversation history.\n *\n * @remarks\n *\n * The history will be stored as a `Message[]` and the variable defaults to `conversation.history`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "history_variable?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "history_variable", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!LLMClientOptions#input_variable:member", + "docComment": "/**\n * Optional. Memory variable used for storing the users input message.\n *\n * @remarks\n *\n * The users input is expected to be a `string` but it's optional and defaults to `temp.input`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "input_variable?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "input_variable", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!LLMClientOptions#logRepairs:member", + "docComment": "/**\n * Optional. If true, any repair attempts will be logged to the console.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "logRepairs?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "logRepairs", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!LLMClientOptions#max_history_messages:member", + "docComment": "/**\n * Optional. Maximum number of conversation history messages to maintain.\n *\n * @remarks\n *\n * The number of tokens worth of history included in the prompt is controlled by the `ConversationHistory` section of the prompt. This controls the automatic pruning of the conversation history that's done by the LLMClient instance. This helps keep your memory from getting too big and defaults to a value of `10` (or 5 turns.)\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_history_messages?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "max_history_messages", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!LLMClientOptions#max_repair_attempts:member", + "docComment": "/**\n * Optional. Maximum number of automatic repair attempts the LLMClient instance will make.\n *\n * @remarks\n *\n * This defaults to a value of `3` and can be set to `0` if you wish to disable repairing of bad responses.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_repair_attempts?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "max_repair_attempts", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!LLMClientOptions#model:member", + "docComment": "/**\n * AI model to use for completing prompts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "model: " + }, + { + "kind": "Reference", + "text": "PromptCompletionModel", + "canonicalReference": "@microsoft/teams-ai!PromptCompletionModel:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "model", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!LLMClientOptions#template:member", + "docComment": "/**\n * Prompt to use for the conversation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "template: " + }, + { + "kind": "Reference", + "text": "PromptTemplate", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "template", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!LLMClientOptions#tokenizer:member", + "docComment": "/**\n * Optional. Tokenizer to use when rendering the prompt or counting tokens.\n *\n * @remarks\n *\n * If not specified a new instance of `GPT3Tokenizer` will be created.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "tokenizer?: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "tokenizer", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!LLMClientOptions#validator:member", + "docComment": "/**\n * Optional. Response validator to use when completing prompts.\n *\n * @remarks\n *\n * If not specified a new instance of `DefaultResponseValidator` will be created. The DefaultResponseValidator returns a `Validation` that says all responses are valid.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validator?: " + }, + { + "kind": "Reference", + "text": "PromptResponseValidator", + "canonicalReference": "@microsoft/teams-ai!PromptResponseValidator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "validator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!Memory:interface", + "docComment": "/**\n * Represents a memory.\n *\n * @remarks\n *\n * A memory is a key-value store that can be used to store and retrieve values.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Memory " + } + ], + "fileUrlPath": "src/MemoryFork.ts", + "releaseTag": "Public", + "name": "Memory", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Memory#deleteValue:member(1)", + "docComment": "/**\n * Deletes a value from the memory.\n *\n * @param path - Path to the value to delete in the form of `[scope].property`. If scope is omitted, the value is deleted from the temporary scope.\n *\n * @throws\n *\n * Error if the path is invalid.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteValue(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "deleteValue" + }, + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Memory#getValue:member(1)", + "docComment": "/**\n * Retrieves a value from the memory.\n *\n * @param path - Path to the value to retrieve in the form of `[scope].property`. If scope is omitted, the value is retrieved from the temporary scope.\n *\n * @returns The value or undefined if not found.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getValue(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "TValue" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "TValue", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "getValue" + }, + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Memory#hasValue:member(1)", + "docComment": "/**\n * Checks if a value exists in the memory.\n *\n * @param path - Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope.\n *\n * @returns True if the value exists, false otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hasValue(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "hasValue" + }, + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Memory#setValue:member(1)", + "docComment": "/**\n * Assigns a value to the memory.\n *\n * @param path - Path to the value to assign in the form of `[scope].property`. If scope is omitted, the value is assigned to the temporary scope.\n *\n * @param value - Value to assign.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setValue(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", value: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "setValue" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!MemoryFork:class", + "docComment": "/**\n * Forks an existing memory.\n *\n * @remarks\n *\n * A memory fork is a memory that is a copy of another memory, but can be modified without affecting the original memory.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class MemoryFork implements " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/MemoryFork.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "MemoryFork", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!MemoryFork:constructor(1)", + "docComment": "/**\n * Creates a new `MemoryFork` instance.\n *\n * @param memory - Memory to fork.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MemoryFork#deleteValue:member(1)", + "docComment": "/**\n * Deletes a value from the memory.\n *\n * @remarks\n *\n * Only forked values will be deleted.\n *\n * @param path - Path to the value to delete in the form of `[scope].property`. If scope is omitted, the value is deleted from the temporary scope.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteValue(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "deleteValue" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MemoryFork#getValue:member(1)", + "docComment": "/**\n * Retrieves a value from the memory.\n *\n * @remarks\n *\n * The forked memory is checked first, then the original memory.\n *\n * @param path - Path to the value to retrieve in the form of `[scope].property`. If scope is omitted, the value is retrieved from the temporary scope.\n *\n * @returns {unknown | undefined} The value or undefined if not found.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getValue(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "TValue" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TValue", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getValue" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MemoryFork#hasValue:member(1)", + "docComment": "/**\n * Checks if a value exists in the memory.\n *\n * @remarks\n *\n * The forked memory is checked first, then the original memory.\n *\n * @param path - Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope.\n *\n * @returns {boolean} True if the value exists, false otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hasValue(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hasValue" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MemoryFork#setValue:member(1)", + "docComment": "/**\n * Assigns a value to the memory.\n *\n * @remarks\n *\n * The value is assigned to the forked memory.\n *\n * @param path - Path to the value to assign in the form of `[scope].property`. If scope is omitted, the value is assigned to the temporary scope.\n *\n * @param value - Value to assign.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setValue(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", value: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setValue" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!Message:interface", + "docComment": "/**\n * A message object sent to or received from an LLM.\n *\n * @param TContent - Optional. Type of the message content. Defaults to `string`\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Message " + } + ], + "fileUrlPath": "src/prompts/Message.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TContent", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "Message", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Message#content:member", + "docComment": "/**\n * Text of the message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "content: " + }, + { + "kind": "Content", + "text": "TContent | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "content", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Message#function_call:member", + "docComment": "/**\n * Optional. A named function to call.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "function_call?: " + }, + { + "kind": "Reference", + "text": "FunctionCall", + "canonicalReference": "@microsoft/teams-ai!FunctionCall:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "function_call", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Message#name:member", + "docComment": "/**\n * Optional. Name of the function that was called.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "name?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Message#role:member", + "docComment": "/**\n * The messages role. Typically 'system', 'user', 'assistant', 'function'.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "role: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "role", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!MessageContentParts:type", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type MessageContentParts = " + }, + { + "kind": "Reference", + "text": "TextContentPart", + "canonicalReference": "@microsoft/teams-ai!TextContentPart:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "ImageContentPart", + "canonicalReference": "@microsoft/teams-ai!ImageContentPart:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/prompts/Message.ts", + "releaseTag": "Public", + "name": "MessageContentParts", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions:class", + "docComment": "/**\n * MessageExtensions class to enable fluent style registration of handlers related to Message Extensions. @template TState Type of the turn state object being persisted.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class MessageExtensions " + } + ], + "fileUrlPath": "src/MessageExtensions.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "MessageExtensions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions:constructor(1)", + "docComment": "/**\n * Creates a new instance of the MessageExtensions class.\n *\n * @param app - Top level application class to register handlers with.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(app: " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "app", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions#anonymousQueryLink:member(1)", + "docComment": "/**\n * Registers a handler for a command that performs anonymous link unfurling.\n *\n * @remarks\n *\n * The `composeExtension/anonymousQueryLink` INVOKE activity does not contain any sort of command ID, so only a single select item handler can be registered. For more information visit https://learn.microsoft.com/microsoftteams/platform/messaging-extensions/how-to/link-unfurling?#enable-zero-install-link-unfurling\n *\n * @param handler - Function to call when the command is received. The handler should return a `MessagingExtensionResult`.\n *\n * @param - {TurnContext} handler.context - Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state - Current state of the turn.\n *\n * @param - {string} handler.url - URL to unfurl.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "anonymousQueryLink(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, url: string) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "MessagingExtensionResult", + "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "anonymousQueryLink" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions#botMessagePreviewEdit:member(1)", + "docComment": "/**\n * Registers a handler to process the 'edit' action of a message that's being previewed by the user prior to sending.\n *\n * @remarks\n *\n * This handler is called when the user clicks the 'Edit' button on a message that's being previewed prior to insertion into the current chat. The handler should return a new view that allows the user to edit the message.\n *\n * @param commandId - ID of the command(s) to register the handler for.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - {TurnContext} handler.context - Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state - Current state of the turn.\n *\n * @param - {Partial} handler.previewActivity - The activity that's being previewed by the user.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "botMessagePreviewEdit(commandId: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, previewActivity: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Activity", + "canonicalReference": "botframework-schema!Activity:interface" + }, + { + "kind": "Content", + "text": ">) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "MessagingExtensionResult", + "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TaskModuleTaskInfo", + "canonicalReference": "botframework-schema!TaskModuleTaskInfo:interface" + }, + { + "kind": "Content", + "text": " | string | null | undefined>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 25, + "endIndex": 27 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "commandId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 10 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 24 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "botMessagePreviewEdit" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions#botMessagePreviewSend:member(1)", + "docComment": "/**\n * Registers a handler to process the 'send' action of a message that's being previewed by the user prior to sending.\n *\n * @remarks\n *\n * This handler is called when the user clicks the 'Send' button on a message that's being previewed prior to insertion into the current chat. The handler should complete the flow by sending the message to the current chat.\n *\n * @param commandId - ID of the command(s) to register the handler for.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - {TurnContext} handler.context - Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state - Current state of the turn.\n *\n * @param - {Partial} handler.previewActivity - The activity that's being previewed by the user.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "botMessagePreviewSend(commandId: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, previewActivity: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Activity", + "canonicalReference": "botframework-schema!Activity:interface" + }, + { + "kind": "Content", + "text": ">) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 21, + "endIndex": 23 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "commandId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 10 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 20 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "botMessagePreviewSend" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions#configureSettings:member(1)", + "docComment": "/**\n * Registers a handler that implements the logic to invoke configuring Message Extension settings\n *\n * @remarks\n *\n * The `composeExtension/setting` INVOKE activity does not contain a command ID, so only a single select item handler can be registered. @template TData Message Extension settings to be configured.\n *\n * @param handler - Function defined by the developer to call when the command is received.\n *\n * @param - {TurnContext} handler.context Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state Current state of the turn.\n *\n * @param - {TData} handler.settings The configuration settings that was submitted.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "configureSettings" + }, + { + "kind": "Content", + "text": ">(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, settings: TData) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TData", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 9 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "configureSettings" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions#fetchTask:member(1)", + "docComment": "/**\n * Registers a handler to process the initial fetch task for an Action based message extension.\n *\n * @remarks\n *\n * Handlers should response with either an initial TaskInfo object or a string containing a message to display to the user.\n *\n * @param commandId - ID of the command(s) to register the handler for.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - {TurnContext} handler.context - Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state - Current state of the turn.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "fetchTask(commandId: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TaskModuleTaskInfo", + "canonicalReference": "botframework-schema!TaskModuleTaskInfo:interface" + }, + { + "kind": "Content", + "text": " | string>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 19, + "endIndex": 21 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "commandId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 10 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 18 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "fetchTask" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions#handleOnButtonClicked:member(1)", + "docComment": "/**\n * Registers a handler that implements the logic when a user has clicked on a button in a Message Extension card.\n *\n * @remarks\n *\n * The `composeExtension/onCardButtonClicked` INVOKE activity does not contain any sort of command ID, so only a single select item handler can be registered. Developers will need to include a type name of some sort in the preview item they return if they need to support multiple select item handlers. @template TData Message Extension data passed on invoke.\n *\n * @param handler - Function defined by the developer to call when the command is received.\n *\n * @param - {TurnContext} handler.context Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state Current state of the turn.\n *\n * @param - {TData} handler.data The data that was submitted.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "handleOnButtonClicked" + }, + { + "kind": "Content", + "text": ">(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, data: TData) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TData", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 9 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "handleOnButtonClicked" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions#query:member(1)", + "docComment": "/**\n * Registers a handler that implements a Search based Message Extension.\n *\n * @remarks\n *\n * This handler is called when the user submits a query to a Search based Message Extension. The handler should return a MessagingExtensionResult containing the results of the query.\n *\n * @param commandId - ID of the command(s) to register the handler for. @template TParams\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - {TurnContext} handler.context - Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state - Current state of the turn.\n *\n * @param - {Query} handler.query - The query parameters that were sent by the client.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "query" + }, + { + "kind": "Content", + "text": " = " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ">(commandId: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, query: " + }, + { + "kind": "Reference", + "text": "Query", + "canonicalReference": "@microsoft/teams-ai!Query:interface" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "MessagingExtensionResult", + "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TParams", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 27, + "endIndex": 29 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "commandId", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 16 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 17, + "endIndex": 26 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "query" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions#queryLink:member(1)", + "docComment": "/**\n * Registers a handler that implements a Link Unfurling based Message Extension.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - {TurnContext} handler.context - Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state - Current state of the turn.\n *\n * @param - {string} handler.url - The URL that should be unfurled.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "queryLink(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, url: string) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "MessagingExtensionResult", + "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "queryLink" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions#queryUrlSetting:member(1)", + "docComment": "/**\n * Registers a handler that invokes the fetch of the configuration settings for a Message Extension.\n *\n * @remarks\n *\n * The `composeExtension/querySettingUrl` INVOKE activity does not contain a command ID, so only a single select item handler can be registered.\n *\n * @param handler - Function defined by the developer to call when the command is received.\n *\n * @param - {TurnContext} handler.context Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state Current state of the turn.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "queryUrlSetting(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "MessagingExtensionResult", + "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "queryUrlSetting" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions#selectItem:member(1)", + "docComment": "/**\n * Registers a handler that implements the logic to handle the tap actions for items returned by a Search based message extension.\n *\n * @remarks\n *\n * The `composeExtension/selectItem` INVOKE activity does not contain any sort of command ID, so only a single select item handler can be registered. Developers will need to include a type name of some sort in the preview item they return if they need to support multiple select item handlers. @template TItem Optional. Type of the item being selected.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - {TurnContext} handler.context Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state Current state of the turn.\n *\n * @param - {TItem} handler.item The item that was selected.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "selectItem" + }, + { + "kind": "Content", + "text": " = " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ">(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, item: TItem) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "MessagingExtensionResult", + "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TItem", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 15, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 14 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "selectItem" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MessageExtensions#submitAction:member(1)", + "docComment": "/**\n * Registers a handler that implements the submit action for an Action based Message Extension. @template TData Optional. Type of data being submitted.\n *\n * @param commandId - ID of the command(s) to register the handler for.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - {TurnContext} handler.context Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state Current state of the turn.\n *\n * @param - {TData} handler.data The data that was submitted.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "submitAction" + }, + { + "kind": "Content", + "text": ">(commandId: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, data: TData) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "MessagingExtensionResult", + "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TaskModuleTaskInfo", + "canonicalReference": "botframework-schema!TaskModuleTaskInfo:interface" + }, + { + "kind": "Content", + "text": " | string | null | undefined>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TData", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 24, + "endIndex": 26 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "commandId", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 13 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 14, + "endIndex": 23 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "submitAction" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Enum", + "canonicalReference": "@microsoft/teams-ai!MessageExtensionsInvokeNames:enum", + "docComment": "/**\n * Names of the invoke activities for Message Extensions.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum MessageExtensionsInvokeNames " + } + ], + "fileUrlPath": "src/MessageExtensions.ts", + "releaseTag": "Public", + "name": "MessageExtensionsInvokeNames", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!MessageExtensionsInvokeNames.ANONYMOUS_QUERY_LINK_INVOKE:member", + "docComment": "/**\n * Name of the invoke activity for anonymous link unfurling.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "ANONYMOUS_QUERY_LINK_INVOKE = " + }, + { + "kind": "Content", + "text": "\"composeExtension/anonymousQueryLink\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "ANONYMOUS_QUERY_LINK_INVOKE" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!MessageExtensionsInvokeNames.CONFIGURE_SETTINGS:member", + "docComment": "/**\n * Name of the invoke activity for configuring settings.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "CONFIGURE_SETTINGS = " + }, + { + "kind": "Content", + "text": "\"composeExtension/setting\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "CONFIGURE_SETTINGS" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!MessageExtensionsInvokeNames.FETCH_TASK_INVOKE:member", + "docComment": "/**\n * Name of the invoke activity for fetching task module.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "FETCH_TASK_INVOKE = " + }, + { + "kind": "Content", + "text": "\"composeExtension/fetchTask\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "FETCH_TASK_INVOKE" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!MessageExtensionsInvokeNames.QUERY_CARD_BUTTON_CLICKED:member", + "docComment": "/**\n * Name of the invoke activity for handling on card button clicked.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "QUERY_CARD_BUTTON_CLICKED = " + }, + { + "kind": "Content", + "text": "\"composeExtension/onCardButtonClicked\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "QUERY_CARD_BUTTON_CLICKED" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!MessageExtensionsInvokeNames.QUERY_INVOKE:member", + "docComment": "/**\n * Name of the invoke activity for query.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "QUERY_INVOKE = " + }, + { + "kind": "Content", + "text": "\"composeExtension/query\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "QUERY_INVOKE" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!MessageExtensionsInvokeNames.QUERY_LINK_INVOKE:member", + "docComment": "/**\n * Name of the invoke activity for query link.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "QUERY_LINK_INVOKE = " + }, + { + "kind": "Content", + "text": "\"composeExtension/queryLink\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "QUERY_LINK_INVOKE" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!MessageExtensionsInvokeNames.QUERY_SETTING_URL:member", + "docComment": "/**\n * Name of the invoke activity for querying configuration settings.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "QUERY_SETTING_URL = " + }, + { + "kind": "Content", + "text": "\"composeExtension/querySettingUrl\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "QUERY_SETTING_URL" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!MessageExtensionsInvokeNames.SELECT_ITEM_INVOKE:member", + "docComment": "/**\n * Name of the invoke activity for selecting an item.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "SELECT_ITEM_INVOKE = " + }, + { + "kind": "Content", + "text": "\"composeExtension/selectItem\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "SELECT_ITEM_INVOKE" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!MessageExtensionsInvokeNames.SUBMIT_ACTION_INVOKE:member", + "docComment": "/**\n * Name of the invoke activity for submit action.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "SUBMIT_ACTION_INVOKE = " + }, + { + "kind": "Content", + "text": "\"composeExtension/submitAction\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "SUBMIT_ACTION_INVOKE" + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!MessageReactionEvents:type", + "docComment": "/**\n * Message reaction event types.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type MessageReactionEvents = " + }, + { + "kind": "Content", + "text": "'reactionsAdded' | 'reactionsRemoved'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/Application.ts", + "releaseTag": "Public", + "name": "MessageReactionEvents", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Enum", + "canonicalReference": "@microsoft/teams-ai!ModerationSeverity:enum", + "docComment": "/**\n * The moderation severity level.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum ModerationSeverity " + } + ], + "fileUrlPath": "src/internals/types.ts", + "releaseTag": "Public", + "name": "ModerationSeverity", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!ModerationSeverity.High:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "High = " + }, + { + "kind": "Content", + "text": "6" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "High" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!ModerationSeverity.Low:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Low = " + }, + { + "kind": "Content", + "text": "2" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "Low" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!ModerationSeverity.Medium:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Medium = " + }, + { + "kind": "Content", + "text": "4" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "Medium" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!ModerationSeverity.Safe:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "Safe = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "Safe" + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!Moderator:interface", + "docComment": "/**\n * A moderator is responsible for reviewing and approving AI prompts and plans. @template TState Type of the applications turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Moderator " + } + ], + "fileUrlPath": "src/moderators/Moderator.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "name": "Moderator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Moderator#reviewInput:member(1)", + "docComment": "/**\n * Reviews an incoming utterance and generated prompt before it's sent to the planner.\n *\n * @remarks\n *\n * The moderator can review the incoming utterance for things like prompt injection attacks or the leakage of sensitive information. The moderator can also review the generated prompt to ensure it's appropriate for the current conversation.\n *\n * To approve a prompt, simply return undefined. Returning a new plan bypasses the planner and redirects to a new set of actions. Typically the moderator will return a new plan with a single DO command that calls `AI.FlaggedInputActionName` to flag the input for review.\n *\n * The moderator can pass any entities that make sense to the redirected action.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @returns An undefined value to approve the prompt or a new plan to redirect to if not approved.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "reviewInput(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "reviewInput" + }, + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Moderator#reviewOutput:member(1)", + "docComment": "/**\n * Reviews a plan generated by the planner before its executed.\n *\n * @remarks\n *\n * The moderator can review the plan to ensure it's appropriate for the current conversation.\n *\n * To approve a plan simply return the plan that was passed in. A new plan can be returned to redirect to a new set of actions. Typically the moderator will return a new plan with a single DO command that calls `AI.FlaggedOutputActionName` to flag the output for review.\n *\n * The moderator can pass any entities that make sense to the redirected action.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param plan - Plan generated by the planner.\n *\n * @returns The plan to execute. Either the current plan passed in for review or a new plan.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "reviewOutput(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", plan: " + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "plan", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "name": "reviewOutput" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!MonologueAugmentation:class", + "docComment": "/**\n * The 'monologue' augmentation.\n *\n * @remarks\n *\n * This augmentation adds support for an inner monologue to the prompt. The monologue helps the LLM to perform chain-of-thought reasoning across multiple turns of conversation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class MonologueAugmentation implements " + }, + { + "kind": "Reference", + "text": "Augmentation", + "canonicalReference": "@microsoft/teams-ai!Augmentation:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "InnerMonologue", + "canonicalReference": "@microsoft/teams-ai!InnerMonologue:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/augmentations/MonologueAugmentation.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "MonologueAugmentation", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!MonologueAugmentation:constructor(1)", + "docComment": "/**\n * Creates a new `MonologueAugmentation` instance.\n *\n * @param actions - List of actions supported by the prompt.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(actions: " + }, + { + "kind": "Reference", + "text": "ChatCompletionAction", + "canonicalReference": "@microsoft/teams-ai!ChatCompletionAction:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "actions", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MonologueAugmentation#createPlanFromResponse:member(1)", + "docComment": "/**\n * Creates a plan given validated response value.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param memory - An interface for accessing state variables.\n *\n * @param response - The validated and transformed response for the prompt.\n *\n * @returns The created plan.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createPlanFromResponse(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "InnerMonologue", + "canonicalReference": "@microsoft/teams-ai!InnerMonologue:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 14 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createPlanFromResponse" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MonologueAugmentation#createPromptSection:member(1)", + "docComment": "/**\n * Creates an optional prompt section for the augmentation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createPromptSection(): " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "createPromptSection" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!MonologueAugmentation#validateResponse:member(1)", + "docComment": "/**\n * Validates a response to a prompt.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param tokenizer - Tokenizer to use for encoding and decoding text.\n *\n * @param response - Response to validate.\n *\n * @param remaining_attempts - Number of remaining attempts to validate the response.\n *\n * @returns A `Validation` object.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateResponse(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", remaining_attempts: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Validation", + "canonicalReference": "@microsoft/teams-ai!Validation:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "InnerMonologue", + "canonicalReference": "@microsoft/teams-ai!InnerMonologue:interface" + }, + { + "kind": "Content", + "text": " | undefined>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 18 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "isOptional": false + }, + { + "parameterName": "remaining_attempts", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateResponse" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 5 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!OAuthSettings:type", + "docComment": "/**\n * Settings used to configure user authentication through the OAuthPrompt.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type OAuthSettings = " + }, + { + "kind": "Reference", + "text": "OAuthPromptSettings", + "canonicalReference": "botbuilder-dialogs!OAuthPromptSettings:interface" + }, + { + "kind": "Content", + "text": " & {\n tokenExchangeUri?: string;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/authentication/Authentication.ts", + "releaseTag": "Public", + "name": "OAuthSettings", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddings:class", + "docComment": "/**\n * A `EmbeddingsModel` for calling OpenAI and Azure OpenAI hosted models.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class OpenAIEmbeddings implements " + }, + { + "kind": "Reference", + "text": "EmbeddingsModel", + "canonicalReference": "@microsoft/teams-ai!EmbeddingsModel:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/embeddings/OpenAIEmbeddings.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "OpenAIEmbeddings", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddings:constructor(1)", + "docComment": "/**\n * Creates a new `OpenAIEmbeddings` instance.\n *\n * @param options - Options for configuring the embeddings client.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "OpenAIEmbeddingsOptions", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddingsOptions:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "AzureOpenAIEmbeddingsOptions", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIEmbeddingsOptions:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddings#createEmbeddingRequest:member(1)", + "docComment": "/**\n * @private\n *\n * @param request - The request to send to the OpenAI API.\n *\n * @returns {Promise>} A promise that resolves to the response from the OpenAI API.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected createEmbeddingRequest(request: " + }, + { + "kind": "Reference", + "text": "CreateEmbeddingRequest", + "canonicalReference": "@microsoft/teams-ai!~CreateEmbeddingRequest:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "AxiosResponse", + "canonicalReference": "axios!AxiosResponse:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CreateEmbeddingResponse", + "canonicalReference": "@microsoft/teams-ai!~CreateEmbeddingResponse:interface" + }, + { + "kind": "Content", + "text": ">>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "request", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createEmbeddingRequest" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddings#createEmbeddings:member(1)", + "docComment": "/**\n * Creates embeddings for the given inputs using the OpenAI API.\n *\n * @param model - Name of the model to use (or deployment for Azure).\n *\n * @param inputs - Text inputs to create embeddings for.\n *\n * @returns {Promise} A `EmbeddingsResponse` with a status and the generated embeddings or a message when an error occurs.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createEmbeddings(model: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", inputs: " + }, + { + "kind": "Content", + "text": "string | string[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "EmbeddingsResponse", + "canonicalReference": "@microsoft/teams-ai!EmbeddingsResponse:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "model", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "inputs", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createEmbeddings" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddings#options:member", + "docComment": "/**\n * Options the client was configured with.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly options: " + }, + { + "kind": "Reference", + "text": "OpenAIEmbeddingsOptions", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddingsOptions:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "AzureOpenAIEmbeddingsOptions", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIEmbeddingsOptions:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "options", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddings#post:member(1)", + "docComment": "/**\n * @private @template TData Optional. Type of the data associated with the action.\n *\n * @param url - The URL to send the request to.\n *\n * @param body - The body of the request.\n *\n * @param retryCount - The number of times the request has been retried.\n *\n * @returns {Promise>} A promise that resolves to the response from the OpenAI API.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected post(url: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", body: " + }, + { + "kind": "Content", + "text": "object" + }, + { + "kind": "Content", + "text": ", retryCount?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "AxiosResponse", + "canonicalReference": "axios!AxiosResponse:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TData", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "url", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "body", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "retryCount", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "post" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddingsOptions:interface", + "docComment": "/**\n * Options for configuring an `OpenAIEmbeddings` to generate embeddings using an OpenAI hosted model.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface OpenAIEmbeddingsOptions extends " + }, + { + "kind": "Reference", + "text": "BaseOpenAIEmbeddingsOptions", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIEmbeddingsOptions:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/embeddings/OpenAIEmbeddings.ts", + "releaseTag": "Public", + "name": "OpenAIEmbeddingsOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddingsOptions#apiKey:member", + "docComment": "/**\n * API key to use when calling the OpenAI API.\n *\n * @remarks\n *\n * A new API key can be created at https://platform.openai.com/account/api-keys.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "apiKey: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "apiKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddingsOptions#endpoint:member", + "docComment": "/**\n * Optional. Endpoint to use when calling the OpenAI API.\n *\n * @remarks\n *\n * For Azure OpenAI this is the deployment endpoint.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "endpoint?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "endpoint", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddingsOptions#model:member", + "docComment": "/**\n * Model to use for completion.\n *\n * @remarks\n *\n * For Azure OpenAI this is the name of the deployment to use.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "model: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "model", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIEmbeddingsOptions#organization:member", + "docComment": "/**\n * Optional. Organization to use when calling the OpenAI API.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "organization?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "organization", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!OpenAIModel:class", + "docComment": "/**\n * A `PromptCompletionModel` for calling OpenAI and Azure OpenAI hosted models.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class OpenAIModel implements " + }, + { + "kind": "Reference", + "text": "PromptCompletionModel", + "canonicalReference": "@microsoft/teams-ai!PromptCompletionModel:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/models/OpenAIModel.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "OpenAIModel", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!OpenAIModel:constructor(1)", + "docComment": "/**\n * Creates a new `OpenAIModel` instance.\n *\n * @param options - Options for configuring the model client.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "OpenAIModelOptions", + "canonicalReference": "@microsoft/teams-ai!OpenAIModelOptions:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "AzureOpenAIModelOptions", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModelOptions:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!OpenAIModel#completePrompt:member(1)", + "docComment": "/**\n * Completes a prompt using OpenAI or Azure OpenAI.\n *\n * @param context - Current turn context.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param functions - Functions to use when rendering the prompt.\n *\n * @param tokenizer - Tokenizer to use when rendering the prompt.\n *\n * @param template - Prompt template to complete.\n *\n * @returns A `PromptResponse` with the status and message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "completePrompt(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", template: " + }, + { + "kind": "Reference", + "text": "PromptTemplate", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 15 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "template", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "completePrompt" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!OpenAIModel#copyOptionsToRequest:member(1)", + "docComment": "/**\n * @param target - \n *\n * @param src - \n *\n * @param fields - @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected copyOptionsToRequest(target: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", src: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ", fields: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "TRequest" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TRequest", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "target", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "src", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "fields", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "copyOptionsToRequest" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!OpenAIModel#createChatCompletion:member(1)", + "docComment": "/**\n * @param request - \n *\n * @param model - @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected createChatCompletion(request: " + }, + { + "kind": "Reference", + "text": "CreateChatCompletionRequest", + "canonicalReference": "@microsoft/teams-ai!~CreateChatCompletionRequest:interface" + }, + { + "kind": "Content", + "text": ", model: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "AxiosResponse", + "canonicalReference": "axios!AxiosResponse:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CreateChatCompletionResponse", + "canonicalReference": "@microsoft/teams-ai!~CreateChatCompletionResponse:interface" + }, + { + "kind": "Content", + "text": ">>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "request", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "model", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createChatCompletion" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!OpenAIModel#options:member", + "docComment": "/**\n * Options the client was configured with.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly options: " + }, + { + "kind": "Reference", + "text": "OpenAIModelOptions", + "canonicalReference": "@microsoft/teams-ai!OpenAIModelOptions:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "AzureOpenAIModelOptions", + "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModelOptions:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "options", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!OpenAIModel#post:member(1)", + "docComment": "/**\n * @param url - \n *\n * @param body - \n *\n * @param retryCount - @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected post(url: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", body: " + }, + { + "kind": "Content", + "text": "object" + }, + { + "kind": "Content", + "text": ", retryCount?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "AxiosResponse", + "canonicalReference": "axios!AxiosResponse:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TData", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "url", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "body", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "retryCount", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "post" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!OpenAIModelOptions:interface", + "docComment": "/**\n * Options for configuring an `OpenAIModel` to call an OpenAI hosted model.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface OpenAIModelOptions extends " + }, + { + "kind": "Reference", + "text": "BaseOpenAIModelOptions", + "canonicalReference": "@microsoft/teams-ai!BaseOpenAIModelOptions:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/models/OpenAIModel.ts", + "releaseTag": "Public", + "name": "OpenAIModelOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIModelOptions#apiKey:member", + "docComment": "/**\n * API key to use when calling the OpenAI API.\n *\n * @remarks\n *\n * A new API key can be created at https://platform.openai.com/account/api-keys.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "apiKey: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "apiKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIModelOptions#defaultModel:member", + "docComment": "/**\n * Default model to use for completions.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultModel: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "defaultModel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIModelOptions#endpoint:member", + "docComment": "/**\n * Optional. Endpoint to use when calling the OpenAI API.\n *\n * @remarks\n *\n * For Azure OpenAI this is the deployment endpoint.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "endpoint?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "endpoint", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIModelOptions#organization:member", + "docComment": "/**\n * Optional. Organization to use when calling the OpenAI API.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "organization?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "organization", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!OpenAIModerator:class", + "docComment": "/**\n * A moderator that uses OpenAI's moderation API to review prompts and plans for safety.\n *\n * @remarks\n *\n * This moderation can be configure to review the input from the user, output from the model, or both. @template TState Optional. Type of the applications turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class OpenAIModerator implements " + }, + { + "kind": "Reference", + "text": "Moderator", + "canonicalReference": "@microsoft/teams-ai!Moderator:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/moderators/OpenAIModerator.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isAbstract": false, + "name": "OpenAIModerator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!OpenAIModerator:constructor(1)", + "docComment": "/**\n * Creates a new instance of the OpenAI based moderator.\n *\n * @param options - Configuration options for the moderator.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "OpenAIModeratorOptions", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!OpenAIModerator#createClient:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected createClient(options: " + }, + { + "kind": "Reference", + "text": "OpenAIModeratorOptions", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "OpenAIClient", + "canonicalReference": "@microsoft/teams-ai!~OpenAIClient:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createClient" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!OpenAIModerator#createModeration:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected createModeration(input: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", model?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CreateModerationResponseResultsInner", + "canonicalReference": "@microsoft/teams-ai!~CreateModerationResponseResultsInner:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "input", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "model", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createModeration" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!OpenAIModerator#options:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "get options(): " + }, + { + "kind": "Reference", + "text": "OpenAIModeratorOptions", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "options", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!OpenAIModerator#reviewInput:member(1)", + "docComment": "/**\n * Reviews an incoming utterance for safety violations.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @returns An undefined value to approve the prompt or a new plan to redirect to if not approved.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "reviewInput(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "reviewInput" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!OpenAIModerator#reviewOutput:member(1)", + "docComment": "/**\n * Reviews the SAY commands generated by the planner for safety violations.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param plan - Plan generated by the planner.\n *\n * @returns The plan to execute. Either the current plan passed in for review or a new plan.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "reviewOutput(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", plan: " + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "plan", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "reviewOutput" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 5, + "endIndex": 7 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface", + "docComment": "/**\n * Options for the OpenAI based moderator.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface OpenAIModeratorOptions " + } + ], + "fileUrlPath": "src/moderators/OpenAIModerator.ts", + "releaseTag": "Public", + "name": "OpenAIModeratorOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#apiKey:member", + "docComment": "/**\n * OpenAI API key\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "apiKey: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "apiKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#apiVersion:member", + "docComment": "/**\n * Optional. Azure Content Safety API version.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "apiVersion?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "apiVersion", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#endpoint:member", + "docComment": "/**\n * Optional. OpenAI endpoint.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "endpoint?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "endpoint", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#model:member", + "docComment": "/**\n * Optional. OpenAI model to use.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "model?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "model", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#moderate:member", + "docComment": "/**\n * Which parts of the conversation to moderate.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "moderate: " + }, + { + "kind": "Content", + "text": "'input' | 'output' | 'both'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "moderate", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#organization:member", + "docComment": "/**\n * Optional. OpenAI organization.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "organization?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "organization", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!Plan:interface", + "docComment": "/**\n * A plan is a set of commands that the AI system will execute.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Plan " + } + ], + "fileUrlPath": "src/planners/Planner.ts", + "releaseTag": "Public", + "name": "Plan", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Plan#commands:member", + "docComment": "/**\n * Array of predicted commands that the AI system should execute.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "commands: " + }, + { + "kind": "Reference", + "text": "PredictedCommand", + "canonicalReference": "@microsoft/teams-ai!PredictedCommand:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "commands", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Plan#type:member", + "docComment": "/**\n * Type to indicate that a plan is being returned.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "'plan'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!Planner:interface", + "docComment": "/**\n * A planner is responsible for generating a plan that the AI system will execute. @template TState Optional. Type of application state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Planner " + } + ], + "fileUrlPath": "src/planners/Planner.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "name": "Planner", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Planner#beginTask:member(1)", + "docComment": "/**\n * Starts a new task.\n *\n * @remarks\n *\n * This method is called when the AI system is ready to start a new task. The planner should generate a plan that the AI system will execute. Returning an empty plan signals that there is no work to be performed.\n *\n * The planner should take the users input from `state.temp.input`.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param ai - The AI system that is generating the plan.\n *\n * @returns The plan that was generated.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "beginTask(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", ai: " + }, + { + "kind": "Reference", + "text": "AI", + "canonicalReference": "@microsoft/teams-ai!AI:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "ai", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "name": "beginTask" + }, + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Planner#continueTask:member(1)", + "docComment": "/**\n * Continues the current task.\n *\n * @remarks\n *\n * This method is called when the AI system has finished executing the previous plan and is ready to continue the current task. The planner should generate a plan that the AI system will execute. Returning an empty plan signals that the task is completed and there is no work to be performed.\n *\n * The output from the last plan step that was executed is passed to the planner via `state.temp.input`.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param ai - The AI system that is generating the plan.\n *\n * @returns The plan that was generated.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "continueTask(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", ai: " + }, + { + "kind": "Reference", + "text": "AI", + "canonicalReference": "@microsoft/teams-ai!AI:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "ai", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "name": "continueTask" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "@microsoft/teams-ai!PlanSchema:var", + "docComment": "/**\n * JSON schema for a `Plan`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "PlanSchema: " + }, + { + "kind": "Reference", + "text": "Schema", + "canonicalReference": "jsonschema!Schema:interface" + } + ], + "fileUrlPath": "src/augmentations/SequenceAugmentation.ts", + "isReadonly": true, + "releaseTag": "Public", + "name": "PlanSchema", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PredictedCommand:interface", + "docComment": "/**\n * A predicted command is a command that the AI system should execute.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PredictedCommand " + } + ], + "fileUrlPath": "src/planners/Planner.ts", + "releaseTag": "Public", + "name": "PredictedCommand", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PredictedCommand#type:member", + "docComment": "/**\n * Type of command to execute.\n *\n * @remarks\n *\n * DO commands are actions that the AI system should perform. SAY commands are responses that the AI system should say.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "'DO' | 'SAY'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PredictedDoCommand:interface", + "docComment": "/**\n * A predicted DO command is an action that the AI system should perform.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PredictedDoCommand extends " + }, + { + "kind": "Reference", + "text": "PredictedCommand", + "canonicalReference": "@microsoft/teams-ai!PredictedCommand:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/planners/Planner.ts", + "releaseTag": "Public", + "name": "PredictedDoCommand", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PredictedDoCommand#action:member", + "docComment": "/**\n * The named action that the AI system should perform.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "action: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "action", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PredictedDoCommand#parameters:member", + "docComment": "/**\n * Any parameters that the AI system should use to perform the action.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "parameters: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "parameters", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PredictedDoCommand#type:member", + "docComment": "/**\n * Type to indicate that a DO command is being returned.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "'DO'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PredictedDoCommandAndHandler:interface", + "docComment": "/**\n * Entities argument passed to the action handler for AI.DoCommandActionName. @template TState Type of the turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PredictedDoCommandAndHandler extends " + }, + { + "kind": "Reference", + "text": "PredictedDoCommand", + "canonicalReference": "@microsoft/teams-ai!PredictedDoCommand:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/AI.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "PredictedDoCommandAndHandler", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PredictedDoCommandAndHandler#handler:member", + "docComment": "/**\n * The handler that should be called to execute the command.\n *\n * @param context - Current turn context.\n *\n * @param state - Current turn state.\n *\n * @param parameters - Optional parameters for the action.\n *\n * @param action - Name of the action being executed.\n *\n * @returns Whether the AI system should continue executing the plan.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, parameters?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": ", action?: string) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "handler", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PredictedSayCommand:interface", + "docComment": "/**\n * A predicted SAY command is a response that the AI system should say.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PredictedSayCommand extends " + }, + { + "kind": "Reference", + "text": "PredictedCommand", + "canonicalReference": "@microsoft/teams-ai!PredictedCommand:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/planners/Planner.ts", + "releaseTag": "Public", + "name": "PredictedSayCommand", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PredictedSayCommand#response:member", + "docComment": "/**\n * The response that the AI system should say.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "response: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "response", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PredictedSayCommand#type:member", + "docComment": "/**\n * Type to indicate that a SAY command is being returned.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "'SAY'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Namespace", + "canonicalReference": "@microsoft/teams-ai!preview:namespace", + "docComment": "", + "excerptTokens": [], + "fileUrlPath": "src/planners/index.ts", + "releaseTag": "None", + "name": "preview", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner:class", + "docComment": "/**\n * A Planner that uses the OpenAI Assistants API. @template TState Optional. Type of application state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class AssistantsPlanner implements " + }, + { + "kind": "Reference", + "text": "Planner", + "canonicalReference": "@microsoft/teams-ai!Planner:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/planners/AssistantsPlanner.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isAbstract": false, + "name": "AssistantsPlanner", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner:constructor(1)", + "docComment": "/**\n * Creates a new `AssistantsPlanner` instance.\n *\n * @param options - Options for configuring the AssistantsPlanner.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "AssistantsPlannerOptions", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlannerOptions:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner#beginTask:member(1)", + "docComment": "/**\n * Starts a new task.\n *\n * @remarks\n *\n * This method is called when the AI system is ready to start a new task. The planner should generate a plan that the AI system will execute. Returning an empty plan signals that there is no work to be performed.\n *\n * The planner should take the users input from `state.temp.input`.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param ai - The AI system that is generating the plan.\n *\n * @returns The plan that was generated.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "beginTask(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", ai: " + }, + { + "kind": "Reference", + "text": "AI", + "canonicalReference": "@microsoft/teams-ai!AI:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "ai", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "beginTask" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner#continueTask:member(1)", + "docComment": "/**\n * Continues the current task.\n *\n * @remarks\n *\n * This method is called when the AI system has finished executing the previous plan and is ready to continue the current task. The planner should generate a plan that the AI system will execute. Returning an empty plan signals that the task is completed and there is no work to be performed.\n *\n * The output from the last plan step that was executed is passed to the planner via `state.temp.input`.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param ai - The AI system that is generating the plan.\n *\n * @returns The plan that was generated.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "continueTask(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": ", ai: " + }, + { + "kind": "Reference", + "text": "AI", + "canonicalReference": "@microsoft/teams-ai!AI:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 8, + "endIndex": 12 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "ai", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "continueTask" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner.createAssistant:member(1)", + "docComment": "/**\n * Static helper method for programmatically creating an assistant.\n *\n * @param apiKey - OpenAI API key.\n *\n * @param request - Definition of the assistant to create.\n *\n * @returns The created assistant.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static createAssistant(apiKey: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", request: " + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Assistants.AssistantCreateParams", + "canonicalReference": "openai!AssistantCreateParams:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Assistants.Assistant", + "canonicalReference": "openai!Assistant:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "apiKey", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "request", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createAssistant" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner#createMessage:member(1)", + "docComment": "/**\n * @param thread_id - \n *\n * @param body - @private Exposed for unit testing.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected createMessage(thread_id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", body: " + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Threads.Messages.MessageCreateParams", + "canonicalReference": "openai!MessageCreateParams:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Threads.Messages.ThreadMessage", + "canonicalReference": "openai!ThreadMessage:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "thread_id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "body", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createMessage" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner#createRun:member(1)", + "docComment": "/**\n * @param thread_id - @private Exposed for unit testing.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected createRun(thread_id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Threads.Runs.Run", + "canonicalReference": "openai!Run:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "thread_id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createRun" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner#createThread:member(1)", + "docComment": "/**\n * @param request - @private Exposed for unit testing.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected createThread(request: " + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Threads.ThreadCreateParams", + "canonicalReference": "openai!ThreadCreateParams:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Threads.Thread", + "canonicalReference": "openai!Thread:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "request", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createThread" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner#listMessages:member(1)", + "docComment": "/**\n * @param thread_id - @private Exposed for unit testing.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected listMessages(thread_id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Threads.Messages.ThreadMessagesPage", + "canonicalReference": "openai!ThreadMessagesPage:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "thread_id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "listMessages" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner#openai:member", + "docComment": "/**\n * Gets the OpenAI SDK instance being used.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get openai(): " + }, + { + "kind": "Reference", + "text": "OpenAI", + "canonicalReference": "@microsoft/teams-ai!~OpenAI" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "openai", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner#retrieveAssistant:member(1)", + "docComment": "/**\n * @private Exposed for unit testing.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected retrieveAssistant(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Assistants.Assistant", + "canonicalReference": "openai!Assistant:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "retrieveAssistant" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner#retrieveLastRun:member(1)", + "docComment": "/**\n * @param thread_id - @private Exposed for unit testing.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected retrieveLastRun(thread_id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Threads.Runs.Run", + "canonicalReference": "openai!Run:interface" + }, + { + "kind": "Content", + "text": " | null>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "thread_id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "retrieveLastRun" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner#retrieveRun:member(1)", + "docComment": "/**\n * @param thread_id - \n *\n * @param run_id - @private Exposed for unit testing.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected retrieveRun(thread_id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", run_id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Threads.Runs.Run", + "canonicalReference": "openai!Run:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "thread_id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "run_id", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "retrieveRun" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlanner#submitToolOutputs:member(1)", + "docComment": "/**\n * @param thread_id - \n *\n * @param run_id - \n *\n * @param tool_outputs - @private Exposed for unit testing.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected submitToolOutputs(thread_id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", run_id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", tool_outputs: " + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Threads.Runs.RunSubmitToolOutputsParams", + "canonicalReference": "openai!RunSubmitToolOutputsParams:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "OpenAI.Beta.Threads.Runs.Run", + "canonicalReference": "openai!Run:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "thread_id", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "run_id", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tool_outputs", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "submitToolOutputs" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 5, + "endIndex": 7 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlannerOptions:interface", + "docComment": "/**\n * Options for configuring the AssistantsPlanner.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AssistantsPlannerOptions " + } + ], + "fileUrlPath": "src/planners/AssistantsPlanner.ts", + "releaseTag": "Public", + "name": "AssistantsPlannerOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlannerOptions#apiKey:member", + "docComment": "/**\n * The OpenAI API key.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "apiKey: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "apiKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlannerOptions#assistant_id:member", + "docComment": "/**\n * The ID of the assistant to use.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "assistant_id: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "assistant_id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlannerOptions#assistants_state_variable:member", + "docComment": "/**\n * Optional. The state variable to use for storing the assistants state.\n *\n * @remarks\n *\n * Defaults to 'conversation.assistants_state'.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "assistants_state_variable?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "assistants_state_variable", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!preview.AssistantsPlannerOptions#polling_interval:member", + "docComment": "/**\n * Optional. Polling interval in milliseconds.\n *\n * @remarks\n *\n * Defaults to 1000 (once a second).\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "polling_interval?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "polling_interval", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + } + ] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!Prompt:class", + "docComment": "/**\n * Top level prompt section.\n *\n * @remarks\n *\n * Prompts are compositional such that they can be nested to create complex prompt hierarchies.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Prompt extends " + }, + { + "kind": "Reference", + "text": "LayoutEngine", + "canonicalReference": "@microsoft/teams-ai!LayoutEngine:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/Prompt.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Prompt", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!Prompt:constructor(1)", + "docComment": "/**\n * Creates a new 'Prompt' instance.\n *\n * @param sections - Sections to render.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `auto`.\n *\n * @param required - Optional. Indicates if this section is required. Defaults to `true`.\n *\n * @param separator - Optional. Separator to use between sections when rendering as text. Defaults to `\\n\\n`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(sections: " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", required?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ", separator?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "sections", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": true + }, + { + "parameterName": "required", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": true + }, + { + "parameterName": "separator", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": true + } + ] + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PromptCompletionModel:interface", + "docComment": "/**\n * An AI model that can be used to complete prompts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PromptCompletionModel " + } + ], + "fileUrlPath": "src/models/PromptCompletionModel.ts", + "releaseTag": "Public", + "name": "PromptCompletionModel", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!PromptCompletionModel#completePrompt:member(1)", + "docComment": "/**\n * Completes a prompt.\n *\n * @param context - Current turn context.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param functions - Functions to use when rendering the prompt.\n *\n * @param tokenizer - Tokenizer to use when rendering the prompt.\n *\n * @param template - Prompt template to complete.\n *\n * @returns A `PromptResponse` with the status and message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "completePrompt(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", template: " + }, + { + "kind": "Reference", + "text": "PromptTemplate", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 15 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "template", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "name": "completePrompt" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!PromptFunction:type", + "docComment": "/**\n * A function that can be called from a prompt template string.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param memory - Interface used to access state variables.\n *\n * @param functions - Collection of functions that can be called from a prompt template string.\n *\n * @param tokenizer - Tokenizer used to encode/decode strings.\n *\n * @param args - Arguments to the function as an array of strings.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type PromptFunction = " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", args: string[]) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/prompts/PromptFunctions.ts", + "releaseTag": "Public", + "name": "PromptFunction", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 12 + } + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface", + "docComment": "/**\n * A collection of functions that can be called from a prompt template string.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PromptFunctions " + } + ], + "fileUrlPath": "src/prompts/PromptFunctions.ts", + "releaseTag": "Public", + "name": "PromptFunctions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions#getFunction:member(1)", + "docComment": "/**\n * Looks up the given function.\n *\n * @remarks\n *\n * Throws an error if the function is not defined.\n *\n * @param name - Name of the function to lookup.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getFunction(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "PromptFunction", + "canonicalReference": "@microsoft/teams-ai!PromptFunction:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "getFunction" + }, + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions#hasFunction:member(1)", + "docComment": "/**\n * Returns true if the given function is defined.\n *\n * @param name - Name of the function to lookup.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hasFunction(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "hasFunction" + }, + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions#invokeFunction:member(1)", + "docComment": "/**\n * Calls the given function.\n *\n * @remarks\n *\n * Throws an error if the function is not defined.\n *\n * @param name - Name of the function to invoke.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param memory - Interface used to access state variables.\n *\n * @param tokenizer - Tokenizer used to encode/decode strings.\n *\n * @param args - Arguments to pass to the function as an array of strings.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "invokeFunction(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", args: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 13 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "args", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "name": "invokeFunction" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!PromptManager:class", + "docComment": "/**\n * A filesystem based prompt manager.\n *\n * @remarks\n *\n * The default prompt manager uses the file system to define prompts that are compatible with Microsoft's Semantic Kernel SDK (see: https://github.com/microsoft/semantic-kernel)\n *\n * Each prompt is a separate folder under a root prompts folder. The folder should contain the following files:\n *\n * - \"config.json\": Required. Contains the prompts configuration and is a serialized instance of `PromptTemplateConfig`. - \"skprompt.txt\": Required. Contains the text of the prompt and supports Semantic Kernels prompt template syntax. - \"actions.json\": Optional. Contains a list of actions that can be called by the prompt.\n *\n * Prompts can be loaded and used by name and new dynamically defined prompt templates can be registered with the prompt manager. @template TState Optional. Type of the applications turn state.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class PromptManager implements " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/PromptManager.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "PromptManager", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!PromptManager:constructor(1)", + "docComment": "/**\n * Creates a new 'PromptManager' instance.\n *\n * @param options - Options used to configure the prompt manager.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "PromptManagerOptions", + "canonicalReference": "@microsoft/teams-ai!PromptManagerOptions:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptManager#addDataSource:member(1)", + "docComment": "/**\n * Registers a new data source with the prompt manager.\n *\n * @param dataSource - Data source to add.\n *\n * @returns The prompt manager for chaining.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "addDataSource(dataSource: " + }, + { + "kind": "Reference", + "text": "DataSource", + "canonicalReference": "@microsoft/teams-ai!DataSource:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "dataSource", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "addDataSource" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptManager#addFunction:member(1)", + "docComment": "/**\n * Registers a new prompt template function with the prompt manager.\n *\n * @param name - Name of the function to add.\n *\n * @param fn - Function to add.\n *\n * @returns The prompt manager for chaining.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "addFunction(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", fn: " + }, + { + "kind": "Reference", + "text": "PromptFunction", + "canonicalReference": "@microsoft/teams-ai!PromptFunction:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "fn", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "addFunction" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptManager#addPrompt:member(1)", + "docComment": "/**\n * Registers a new prompt template with the prompt manager.\n *\n * @param prompt - Prompt template to add.\n *\n * @returns The prompt manager for chaining.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "addPrompt(prompt: " + }, + { + "kind": "Reference", + "text": "PromptTemplate", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "this" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "prompt", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "addPrompt" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptManager#getDataSource:member(1)", + "docComment": "/**\n * Looks up a data source by name.\n *\n * @param name - Name of the data source to lookup.\n *\n * @returns The data source.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getDataSource(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "DataSource", + "canonicalReference": "@microsoft/teams-ai!DataSource:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getDataSource" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptManager#getFunction:member(1)", + "docComment": "/**\n * Looks up a prompt template function by name.\n *\n * @param name - Name of the function to lookup.\n *\n * @returns The function.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getFunction(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "PromptFunction", + "canonicalReference": "@microsoft/teams-ai!PromptFunction:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getFunction" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptManager#getPrompt:member(1)", + "docComment": "/**\n * Loads a named prompt template from the filesystem.\n *\n * @remarks\n *\n * The template will be pre-parsed and cached for use when the template is rendered by name.\n *\n * Any augmentations will also be added to the template.\n *\n * @param name - Name of the prompt to load.\n *\n * @returns The loaded and parsed prompt template.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getPrompt(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "PromptTemplate", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getPrompt" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptManager#hasDataSource:member(1)", + "docComment": "/**\n * Checks for the existence of a named data source.\n *\n * @param name - Name of the data source to lookup.\n *\n * @returns True if the data source exists.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hasDataSource(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hasDataSource" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptManager#hasFunction:member(1)", + "docComment": "/**\n * Checks for the existence of a named prompt template function.\n *\n * @param name - Name of the function to lookup.\n *\n * @returns True if the function exists.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hasFunction(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hasFunction" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptManager#hasPrompt:member(1)", + "docComment": "/**\n * Checks for the existence of a named prompt.\n *\n * @param name - Name of the prompt to load.\n *\n * @returns True if the prompt exists.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hasPrompt(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hasPrompt" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptManager#invokeFunction:member(1)", + "docComment": "/**\n * Invokes a prompt template function by name.\n *\n * @param name - Name of the function to invoke.\n *\n * @param context - Turn context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param tokenizer - Tokenizer to use when rendering the prompt.\n *\n * @param args - Arguments to pass to the function.\n *\n * @returns Value returned by the function.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "invokeFunction(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", args: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 13 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "args", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "invokeFunction" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!PromptManager#options:member", + "docComment": "/**\n * Gets the configured prompt manager options.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get options(): " + }, + { + "kind": "Reference", + "text": "ConfiguredPromptManagerOptions", + "canonicalReference": "@microsoft/teams-ai!ConfiguredPromptManagerOptions:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "options", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PromptManagerOptions:interface", + "docComment": "/**\n * Options used to configure the prompt manager.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PromptManagerOptions " + } + ], + "fileUrlPath": "src/prompts/PromptManager.ts", + "releaseTag": "Public", + "name": "PromptManagerOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptManagerOptions#max_conversation_history_tokens:member", + "docComment": "/**\n * Optional. Maximum number of tokens to of conversation history to include in prompts.\n *\n * @remarks\n *\n * The default is to let conversation history consume the remainder of the prompts `max_input_tokens` budget. Setting this a value greater then 1 will override that and all prompts will use a fixed token budget.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_conversation_history_tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "max_conversation_history_tokens", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptManagerOptions#max_history_messages:member", + "docComment": "/**\n * Optional. Maximum number of messages to use when rendering conversation_history.\n *\n * @remarks\n *\n * This controls the automatic pruning of the conversation history that's done by the planners LLMClient instance. This helps keep your memory from getting too big and defaults to a value of `10` (or 5 turns.)\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_history_messages?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "max_history_messages", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptManagerOptions#max_input_tokens:member", + "docComment": "/**\n * Optional. Maximum number of tokens user input to include in prompts.\n *\n * @remarks\n *\n * This defaults to unlimited but can set to a value greater then `1` to limit the length of user input included in prompts. For example, if set to `100` then the any user input over 100 tokens in length will be truncated.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_input_tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "max_input_tokens", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptManagerOptions#promptsFolder:member", + "docComment": "/**\n * Path to the filesystem folder containing all the applications prompts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "promptsFolder: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "promptsFolder", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptManagerOptions#role:member", + "docComment": "/**\n * Optional. Message role to use for loaded prompts.\n *\n * @remarks\n *\n * Defaults to 'system'.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "role?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "role", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface", + "docComment": "/**\n * Response returned by a `PromptCompletionClient`. @template TContent Optional. Type of the content in the message. Defaults to `unknown`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PromptResponse " + } + ], + "fileUrlPath": "src/models/PromptCompletionModel.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TContent", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "PromptResponse", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptResponse#error:member", + "docComment": "/**\n * Error returned.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "error?: " + }, + { + "kind": "Reference", + "text": "Error", + "canonicalReference": "!Error:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "error", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptResponse#input:member", + "docComment": "/**\n * User input message sent to the model. `undefined` if no input was sent.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "input?: " + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "input", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptResponse#message:member", + "docComment": "/**\n * Message returned.\n *\n * @remarks\n *\n * This will be a `Message` object if the status is `success`, otherwise it will be a `string`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "message?: " + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "message", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptResponse#status:member", + "docComment": "/**\n * Status of the prompt response.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "status: " + }, + { + "kind": "Reference", + "text": "PromptResponseStatus", + "canonicalReference": "@microsoft/teams-ai!PromptResponseStatus:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "status", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!PromptResponseStatus:type", + "docComment": "/**\n * Status of the prompt response.\n *\n * @remarks\n *\n * `success` - The prompt was successfully completed. `error` - An error occurred while completing the prompt. `rate_limited` - The request was rate limited. `invalid_response` - The response was invalid. `too_long` - The rendered prompt exceeded the `max_input_tokens` limit.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type PromptResponseStatus = " + }, + { + "kind": "Content", + "text": "'success' | 'error' | 'rate_limited' | 'invalid_response' | 'too_long'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/models/PromptCompletionModel.ts", + "releaseTag": "Public", + "name": "PromptResponseStatus", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PromptResponseValidator:interface", + "docComment": "/**\n * A validator that can be used to validate prompt responses.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PromptResponseValidator " + } + ], + "fileUrlPath": "src/validators/PromptResponseValidator.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TValue", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "PromptResponseValidator", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!PromptResponseValidator#validateResponse:member(1)", + "docComment": "/**\n * Validates a response to a prompt.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param tokenizer - Tokenizer to use for encoding and decoding text.\n *\n * @param response - Response to validate.\n *\n * @param remaining_attempts - Number of remaining attempts to validate the response.\n *\n * @returns A `Validation` object.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateResponse(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", remaining_attempts: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Validation", + "canonicalReference": "@microsoft/teams-ai!Validation:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 16 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "isOptional": false + }, + { + "parameterName": "remaining_attempts", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": false + } + ], + "name": "validateResponse" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface", + "docComment": "/**\n * A section that can be rendered to a prompt as either text or an array of `Message` objects.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PromptSection " + } + ], + "fileUrlPath": "src/prompts/PromptSection.ts", + "releaseTag": "Public", + "name": "PromptSection", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!PromptSection#renderAsMessages:member(1)", + "docComment": "/**\n * Renders the section as a list of messages.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param functions - Registry of functions that can be used by the section.\n *\n * @param tokenizer - Tokenizer to use when rendering the section.\n *\n * @param maxTokens - Maximum number of tokens allowed to be rendered.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "name": "renderAsMessages" + }, + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!PromptSection#renderAsText:member(1)", + "docComment": "/**\n * Renders the section as a string of text.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param functions - Registry of functions that can be used by the section.\n *\n * @param tokenizer - Tokenizer to use when rendering the section.\n *\n * @param maxTokens - Maximum number of tokens allowed to be rendered.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsText(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 15 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "name": "renderAsText" + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptSection#required:member", + "docComment": "/**\n * If true the section is mandatory otherwise it can be safely dropped.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly required: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "required", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptSection#tokens:member", + "docComment": "/**\n * The requested token budget for this section. - Values between 0.0 and 1.0 represent a percentage of the total budget and the section will be layed out proportionally to all other sections. - Values greater than 1.0 represent the max number of tokens the section should be allowed to consume.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly tokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "tokens", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase:class", + "docComment": "/**\n * Abstract Base class for most prompt sections.\n *\n * @remarks\n *\n * This class provides a default implementation of `renderAsText()` so that derived classes only need to implement `renderAsMessages()`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare abstract class PromptSectionBase implements " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/PromptSectionBase.ts", + "releaseTag": "Public", + "isAbstract": true, + "name": "PromptSectionBase", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase:constructor(1)", + "docComment": "/**\n * Creates a new 'PromptSectionBase' instance.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `auto`.\n *\n * @param required - Optional. Indicates if this section is required. Defaults to `true`.\n *\n * @param separator - Optional. Separator to use between sections when rendering as text. Defaults to `\\n`.\n *\n * @param textPrefix - Optional. Prefix to use for text output. Defaults to `undefined`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", required?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ", separator?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", textPrefix?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "required", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "separator", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + }, + { + "parameterName": "textPrefix", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase.getMessageText:member(1)", + "docComment": "/**\n * Returns the content of a message as a string.\n *\n * @param message - Message to get the text of.\n *\n * @returns The message content as a string.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static getMessageText(message: " + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "message", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getMessageText" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase#getTokenBudget:member(1)", + "docComment": "/**\n * Calculates the token budget for the prompt section.\n *\n * @remarks\n *\n * If the section has a fixed length, the budget will be the minimum of the section's length and the maximum number of tokens. Otherwise, the budget will be the maximum number of tokens.\n *\n * @param maxTokens - Maximum number of tokens allowed for the rendered prompt.\n *\n * @returns The token budget for the prompt section.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected getTokenBudget(maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getTokenBudget" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase#renderAsMessages:member(1)", + "docComment": "/**\n * Renders the prompt section as a list of `Message` objects.\n *\n * @remarks\n *\n * MUST be implemented by derived classes.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param memory - Interface for accessing state variables.\n *\n * @param functions - Functions for rendering prompts.\n *\n * @param tokenizer - Tokenizer to use for encoding/decoding text.\n *\n * @param maxTokens - Maximum number of tokens allowed for the rendered prompt.\n *\n * @returns The rendered prompt section.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "abstract renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": true, + "name": "renderAsMessages" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase#renderAsText:member(1)", + "docComment": "/**\n * Renders the prompt section as a string of text.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param memory - Interface for accessing state variables.\n *\n * @param functions - Functions for rendering prompts.\n *\n * @param tokenizer - Tokenizer to use for encoding/decoding text.\n *\n * @param maxTokens - Maximum number of tokens allowed for the rendered prompt.\n *\n * @returns The rendered prompt section.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsText(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 15 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsText" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase#required:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly required: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "required", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase#returnMessages:member(1)", + "docComment": "/**\n * Helper method for returning a list of messages from `renderAsMessages()`.\n *\n * @remarks\n *\n * If the section has a fixed length, the function will truncate the list of messages to fit within the token budget.\n *\n * @param output - List of messages to return.\n *\n * @param length - Total number of tokens consumed by the list of messages.\n *\n * @param tokenizer - Tokenizer to use for encoding/decoding text.\n *\n * @param maxTokens - Maximum number of tokens allowed for the rendered prompt.\n *\n * @returns The rendered prompt section.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected returnMessages(output: " + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", length: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 14 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "output", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + }, + { + "parameterName": "length", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 9 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "returnMessages" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase#separator:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly separator: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "separator", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase#textPrefix:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly textPrefix: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "textPrefix", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase#tokens:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly tokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "tokens", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface", + "docComment": "/**\n * Prompt template cached by the prompt manager.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PromptTemplate " + } + ], + "fileUrlPath": "src/prompts/PromptTemplate.ts", + "releaseTag": "Public", + "name": "PromptTemplate", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate#actions:member", + "docComment": "/**\n * Optional list of actions the model may generate JSON inputs for.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "actions?: " + }, + { + "kind": "Reference", + "text": "ChatCompletionAction", + "canonicalReference": "@microsoft/teams-ai!ChatCompletionAction:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "actions", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate#augmentation:member", + "docComment": "/**\n * Optional augmentation for the prompt template.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "augmentation?: " + }, + { + "kind": "Reference", + "text": "Augmentation", + "canonicalReference": "@microsoft/teams-ai!Augmentation:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "augmentation", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate#config:member", + "docComment": "/**\n * Configuration settings for the prompt template.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "config: " + }, + { + "kind": "Reference", + "text": "PromptTemplateConfig", + "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "config", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate#name:member", + "docComment": "/**\n * Name of the prompt template.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptTemplate#prompt:member", + "docComment": "/**\n * Text of the prompt template.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "prompt: " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "prompt", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig:interface", + "docComment": "/**\n * Serialized prompt template configuration.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface PromptTemplateConfig " + } + ], + "fileUrlPath": "src/prompts/PromptTemplate.ts", + "releaseTag": "Public", + "name": "PromptTemplateConfig", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig#augmentation:member", + "docComment": "/**\n * Optional. Augmentation settings for the prompt.\n *\n * @remarks\n *\n * New in schema version 1.1.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "augmentation?: " + }, + { + "kind": "Reference", + "text": "AugmentationConfig", + "canonicalReference": "@microsoft/teams-ai!AugmentationConfig:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "augmentation", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig#completion:member", + "docComment": "/**\n * Completion settings for the prompt.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "completion: " + }, + { + "kind": "Reference", + "text": "CompletionConfig", + "canonicalReference": "@microsoft/teams-ai!CompletionConfig:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "completion", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig#default_backends:member", + "docComment": "/**\n * @remarks\n *\n * Passing the name of a model to use here will override the default model used by a planner.\n *\n * @deprecated\n *\n * Use `completion.model` instead. Optional. Array of backends (models) to use for the prompt.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "default_backends?: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "default_backends", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig#description:member", + "docComment": "/**\n * Optional. Description of the prompts purpose.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "description?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "description", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig#schema:member", + "docComment": "/**\n * The schema version of the prompt template. Can be '1' or '1.1'.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "schema: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "schema", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig#type:member", + "docComment": "/**\n * Type of prompt template. Should always be 'completion'.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "'completion'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!Query:interface", + "docComment": "/**\n * Query arguments for a search-based message extension. @template TParams Type of the query parameters.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Query" + }, + { + "kind": "Content", + "text": "> " + } + ], + "fileUrlPath": "src/Application.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TParams", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "Query", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Query#count:member", + "docComment": "/**\n * Number of items to return in the result set.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "count: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "count", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Query#parameters:member", + "docComment": "/**\n * Query parameters.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "parameters: " + }, + { + "kind": "Content", + "text": "TParams" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "parameters", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Query#skip:member", + "docComment": "/**\n * Number of items to skip in the result set.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "skip: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "skip", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface", + "docComment": "/**\n * The result of rendering a section.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface RenderedPromptSection " + } + ], + "fileUrlPath": "src/prompts/PromptSection.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "RenderedPromptSection", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection#length:member", + "docComment": "/**\n * The number of tokens that were rendered.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "length: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "length", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection#output:member", + "docComment": "/**\n * The section that was rendered.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "output: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "output", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection#tooLong:member", + "docComment": "/**\n * If true the section was truncated because it exceeded the maxTokens budget.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "tooLong: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "tooLong", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!RouteHandler:type", + "docComment": "/**\n * Function for handling an incoming request. @template TState Type of the turn state.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param state - Current turn state.\n *\n * @returns A promise that resolves when the handler completes its processing.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type RouteHandler = " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/Application.ts", + "releaseTag": "Public", + "name": "RouteHandler", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 3, + "endIndex": 8 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type", + "docComment": "/**\n * Function for selecting whether a route handler should be triggered.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @returns A promise that resolves with a boolean indicating whether the route handler should be triggered.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type RouteSelector = " + }, + { + "kind": "Reference", + "text": "Selector", + "canonicalReference": "@microsoft/teams-ai!Selector:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/Application.ts", + "releaseTag": "Public", + "name": "RouteSelector", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!Selector:type", + "docComment": "/**\n * A selector function for matching incoming activities.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type Selector = " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/Application.ts", + "releaseTag": "Public", + "name": "Selector", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!SequenceAugmentation:class", + "docComment": "/**\n * The 'sequence' augmentation.\n *\n * @remarks\n *\n * This augmentation allows the model to return a sequence of actions to perform.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class SequenceAugmentation implements " + }, + { + "kind": "Reference", + "text": "Augmentation", + "canonicalReference": "@microsoft/teams-ai!Augmentation:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/augmentations/SequenceAugmentation.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "SequenceAugmentation", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!SequenceAugmentation:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `SequenceAugmentation` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(actions: " + }, + { + "kind": "Reference", + "text": "ChatCompletionAction", + "canonicalReference": "@microsoft/teams-ai!ChatCompletionAction:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "actions", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!SequenceAugmentation#createPlanFromResponse:member(1)", + "docComment": "/**\n * Creates a plan given validated response value.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param memory - An interface for accessing state variables.\n *\n * @param response - The validated and transformed response for the prompt.\n *\n * @returns The created plan.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createPlanFromResponse(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 10, + "endIndex": 14 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "createPlanFromResponse" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!SequenceAugmentation#createPromptSection:member(1)", + "docComment": "/**\n * Creates an optional prompt section for the augmentation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createPromptSection(): " + }, + { + "kind": "Reference", + "text": "PromptSection", + "canonicalReference": "@microsoft/teams-ai!PromptSection:interface" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "createPromptSection" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!SequenceAugmentation#validateResponse:member(1)", + "docComment": "/**\n * Validates a response to a prompt.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param tokenizer - Tokenizer to use for encoding and decoding text.\n *\n * @param response - Response to validate.\n *\n * @param remaining_attempts - Number of remaining attempts to validate the response.\n *\n * @returns A `Validation` object.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "validateResponse(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", response: " + }, + { + "kind": "Reference", + "text": "PromptResponse", + "canonicalReference": "@microsoft/teams-ai!PromptResponse:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", remaining_attempts: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Validation", + "canonicalReference": "@microsoft/teams-ai!Validation:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Plan", + "canonicalReference": "@microsoft/teams-ai!Plan:interface" + }, + { + "kind": "Content", + "text": " | undefined>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 18 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "response", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 9 + }, + "isOptional": false + }, + { + "parameterName": "remaining_attempts", + "parameterTypeTokenRange": { + "startIndex": 10, + "endIndex": 11 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "validateResponse" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 5 + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!SignInResponse:type", + "docComment": "/**\n * The sign in response.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type SignInResponse = " + }, + { + "kind": "Content", + "text": "{\n status: " + }, + { + "kind": "Reference", + "text": "SignInStatus", + "canonicalReference": "@microsoft/teams-ai!SignInStatus:type" + }, + { + "kind": "Content", + "text": ";\n error?: unknown;\n cause?: " + }, + { + "kind": "Reference", + "text": "AuthErrorReason", + "canonicalReference": "@microsoft/teams-ai!AuthErrorReason:type" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/authentication/Authentication.ts", + "releaseTag": "Public", + "name": "SignInResponse", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!SignInStatus:type", + "docComment": "/**\n * The sign in status.\n *\n * @remarks\n *\n * `pending` - The user is not signed in and the bot has initiated the sign in flow. `complete` - The user has successfully signed in. `error` - An error occurred while signing the user in.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type SignInStatus = " + }, + { + "kind": "Content", + "text": "'pending' | 'complete' | 'error'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/authentication/Authentication.ts", + "releaseTag": "Public", + "name": "SignInStatus", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!SystemMessage:class", + "docComment": "/**\n * A system message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class SystemMessage extends " + }, + { + "kind": "Reference", + "text": "TemplateSection", + "canonicalReference": "@microsoft/teams-ai!TemplateSection:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/SystemMessage.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "SystemMessage", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!SystemMessage:constructor(1)", + "docComment": "/**\n * Creates a new 'SystemMessage' instance.\n *\n * @param template - Template to use for this section.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `auto`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(template: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "template", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ] + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Enum", + "canonicalReference": "@microsoft/teams-ai!TaskModuleInvokeNames:enum", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum TaskModuleInvokeNames " + } + ], + "fileUrlPath": "src/TaskModules.ts", + "releaseTag": "Public", + "name": "TaskModuleInvokeNames", + "preserveMemberOrder": false, + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!TaskModuleInvokeNames.CONFIG_FETCH_INVOKE_NAME:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "CONFIG_FETCH_INVOKE_NAME = " + }, + { + "kind": "Content", + "text": "\"config/fetch\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "CONFIG_FETCH_INVOKE_NAME" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!TaskModuleInvokeNames.CONFIG_SUBMIT_INVOKE_NAME:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "CONFIG_SUBMIT_INVOKE_NAME = " + }, + { + "kind": "Content", + "text": "\"config/submit\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "CONFIG_SUBMIT_INVOKE_NAME" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!TaskModuleInvokeNames.DEFAULT_TASK_DATA_FILTER:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "DEFAULT_TASK_DATA_FILTER = " + }, + { + "kind": "Content", + "text": "\"verb\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "DEFAULT_TASK_DATA_FILTER" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!TaskModuleInvokeNames.FETCH_INVOKE_NAME:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "FETCH_INVOKE_NAME = " + }, + { + "kind": "Content", + "text": "\"task/fetch\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "FETCH_INVOKE_NAME" + }, + { + "kind": "EnumMember", + "canonicalReference": "@microsoft/teams-ai!TaskModuleInvokeNames.SUBMIT_INVOKE_NAME:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "SUBMIT_INVOKE_NAME = " + }, + { + "kind": "Content", + "text": "\"task/submit\"" + } + ], + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "name": "SUBMIT_INVOKE_NAME" + } + ] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!TaskModules:class", + "docComment": "/**\n * TaskModules class to enable fluent style registration of handlers related to Task Modules. @template TState Type of the turn state object being persisted.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class TaskModules " + } + ], + "fileUrlPath": "src/TaskModules.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isAbstract": false, + "name": "TaskModules", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!TaskModules:constructor(1)", + "docComment": "/**\n * Creates a new instance of the TaskModules class.\n *\n * @param app - Top level application class to register handlers with.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(app: " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "app", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TaskModules#configFetch:member(1)", + "docComment": "/**\n * Registers a handler for fetching Teams config data for Auth or Task Modules @template TData Optional. Type of the data object being passed to the handler.\n *\n * @param handler - Function to call when the handler is triggered.\n *\n * @param - {TurnContext} handler.context - Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state - Current state of the turn.\n *\n * @param - {TData} handler.data - Data object passed to the handler.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "configFetch" + }, + { + "kind": "Content", + "text": ">(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, data: TData) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "BotConfigAuth", + "canonicalReference": "botframework-schema!BotConfigAuth:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TaskModuleResponse", + "canonicalReference": "botframework-schema!TaskModuleResponse:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TData", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 14, + "endIndex": 16 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 13 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "configFetch" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TaskModules#configSubmit:member(1)", + "docComment": "/**\n * Registers a handler for submitting Teams config data for Auth or Task Modules @template TData Optional. Type of the data object being passed to the handler.\n *\n * @param handler - Function to call when the handler is triggered.\n *\n * @param - {TurnContext} handler.context - Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state - Current state of the turn.\n *\n * @param - {TData} handler.data - Data object passed to the handler.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "configSubmit" + }, + { + "kind": "Content", + "text": ">(handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, data: TData) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "BotConfigAuth", + "canonicalReference": "botframework-schema!BotConfigAuth:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "TaskModuleResponse", + "canonicalReference": "botframework-schema!TaskModuleResponse:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TData", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 14, + "endIndex": 16 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 13 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "configSubmit" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TaskModules#fetch:member(1)", + "docComment": "/**\n * Registers a handler to process the initial fetch of the task module.\n *\n * @remarks\n *\n * Handlers should respond with either an initial TaskInfo object or a string containing a message to display to the user. @template TData Optional. Type of the data object being passed to the handler.\n *\n * @param verb - Name of the verb(s) to register the handler for.\n *\n * @param handler - Function to call when the handler is triggered.\n *\n * @param - {TurnContext} handler.context - Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state - Current state of the turn.\n *\n * @param - {TData} handler.data - Data object passed to the handler.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "fetch" + }, + { + "kind": "Content", + "text": " = " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ">(verb: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, data: TData) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TaskModuleTaskInfo", + "canonicalReference": "botframework-schema!TaskModuleTaskInfo:interface" + }, + { + "kind": "Content", + "text": " | string>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TData", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 25, + "endIndex": 27 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "verb", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 16 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 17, + "endIndex": 24 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "fetch" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TaskModules#submit:member(1)", + "docComment": "/**\n * Registers a handler to process the submission of a task module.\n *\n * @remarks\n *\n * Handlers should respond with another TaskInfo object, message string, or `null` to indicate the task is completed. @template TData Optional. Type of the data object being passed to the handler.\n *\n * @param verb - Name of the verb(s) to register the handler for.\n *\n * @param handler - Function to call when the handler is triggered.\n *\n * @param - {TurnContext} handler.context - Context for the current turn of conversation with the user.\n *\n * @param - {TState} handler.state - Current state of the turn.\n *\n * @param - {TData} handler.data - Data object passed to the handler.\n *\n * @returns {Application} The application for chaining purposes.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "submit" + }, + { + "kind": "Content", + "text": " = " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ">(verb: " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": " | (string | " + }, + { + "kind": "Reference", + "text": "RegExp", + "canonicalReference": "!RegExp:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "RouteSelector", + "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" + }, + { + "kind": "Content", + "text": ")[]" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Content", + "text": "(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: TState, data: TData) => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "TaskModuleTaskInfo", + "canonicalReference": "botframework-schema!TaskModuleTaskInfo:interface" + }, + { + "kind": "Content", + "text": " | string | null | undefined>" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Application", + "canonicalReference": "@microsoft/teams-ai!Application:class" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TData", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 4, + "endIndex": 6 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 25, + "endIndex": 27 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "verb", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 16 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 17, + "endIndex": 24 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "submit" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!TaskModulesOptions:interface", + "docComment": "/**\n * Options for TaskModules class.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TaskModulesOptions " + } + ], + "fileUrlPath": "src/TaskModules.ts", + "releaseTag": "Public", + "name": "TaskModulesOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!TaskModulesOptions#taskDataFilter:member", + "docComment": "/**\n * Data field to use to ide1ntify the verb of the handler to trigger.\n *\n * @remarks\n *\n * When a task module is triggered, the field name specified here will be used to determine the name of the verb for the handler to route the request to.\n *\n * Defaults to a value of 'verb'.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "taskDataFilter?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "taskDataFilter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!TeamsAttachmentDownloader:class", + "docComment": "/**\n * Downloads attachments from Teams using the bots access token.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class TeamsAttachmentDownloader implements " + }, + { + "kind": "Reference", + "text": "InputFileDownloader", + "canonicalReference": "@microsoft/teams-ai!InputFileDownloader:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/TeamsAttachmentDownloader.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TState", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "isAbstract": false, + "name": "TeamsAttachmentDownloader", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!TeamsAttachmentDownloader:constructor(1)", + "docComment": "/**\n * Creates a new instance of the `TeamsAttachmentDownloader` class.\n *\n * @param options - Options for the `TeamsAttachmentDownloader` class.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(options: " + }, + { + "kind": "Reference", + "text": "TeamsAttachmentDownloaderOptions", + "canonicalReference": "@microsoft/teams-ai!TeamsAttachmentDownloaderOptions:interface" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TeamsAttachmentDownloader#downloadFiles:member(1)", + "docComment": "/**\n * Download any files relative to the current user's input.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "downloadFiles(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", state: " + }, + { + "kind": "Content", + "text": "TState" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "InputFile", + "canonicalReference": "@microsoft/teams-ai!InputFile:interface" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "state", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "downloadFiles" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 5, + "endIndex": 7 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!TeamsAttachmentDownloaderOptions:interface", + "docComment": "/**\n * Options for the `TeamsAttachmentDownloader` class.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TeamsAttachmentDownloaderOptions " + } + ], + "fileUrlPath": "src/TeamsAttachmentDownloader.ts", + "releaseTag": "Public", + "name": "TeamsAttachmentDownloaderOptions", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!TeamsAttachmentDownloaderOptions#botAppId:member", + "docComment": "/**\n * The Microsoft App ID of the bot.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "botAppId: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "botAppId", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!TeamsAttachmentDownloaderOptions#botAppPassword:member", + "docComment": "/**\n * The Microsoft App Password of the bot.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "botAppPassword: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "botAppPassword", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!TeamsMessageEvents:type", + "docComment": "/**\n * Message related events.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TeamsMessageEvents = " + }, + { + "kind": "Content", + "text": "'undeleteMessage' | 'softDeleteMessage' | 'editMessage'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/Application.ts", + "releaseTag": "Public", + "name": "TeamsMessageEvents", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!TemplateSection:class", + "docComment": "/**\n * A template section that will be rendered as a message.\n *\n * @remarks\n *\n * This section type is used to render a template as a message. The template can contain parameters that will be replaced with values from memory or call functions to generate dynamic content.\n *\n * Template syntax: - `{{$memoryKey}}` - Renders the value of the specified memory key. - `{{functionName}}` - Calls the specified function and renders the result. - `{{functionName arg1 arg2 ...}}` - Calls the specified function with the provided list of arguments.\n *\n * Function arguments are optional and separated by spaces. They can be quoted using `'`, `\"`, or `\\`` delimiters.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class TemplateSection extends " + }, + { + "kind": "Reference", + "text": "PromptSectionBase", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/TemplateSection.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "TemplateSection", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!TemplateSection:constructor(1)", + "docComment": "/**\n * Creates a new 'TemplateSection' instance.\n *\n * @param template - Template to use for this section.\n *\n * @param role - Message role to use for this section.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `auto`.\n *\n * @param required - Optional. Indicates if this section is required. Defaults to `true`.\n *\n * @param separator - Optional. Separator to use between sections when rendering as text. Defaults to `\\n`.\n *\n * @param textPrefix - Optional. Prefix to use for text output. Defaults to `undefined`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(template: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", role: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", required?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ", separator?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", textPrefix?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "template", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "role", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + }, + { + "parameterName": "required", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + }, + { + "parameterName": "separator", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": true + }, + { + "parameterName": "textPrefix", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TemplateSection#renderAsMessages:member(1)", + "docComment": "/**\n * @param context - \n *\n * @param memory - \n *\n * @param functions - \n *\n * @param tokenizer - \n *\n * @param maxTokens - @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsMessages" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TemplateSection#role:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly role: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "role", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TemplateSection#template:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly template: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "template", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!TextContentPart:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TextContentPart " + } + ], + "fileUrlPath": "src/prompts/Message.ts", + "releaseTag": "Public", + "name": "TextContentPart", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!TextContentPart#text:member", + "docComment": "/**\n * The text of the message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "text: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "text", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!TextContentPart#type:member", + "docComment": "/**\n * Type of the message content. Should always be 'text'.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "'text'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!TextDataSource:class", + "docComment": "/**\n * A data source that can be used to add a static block of text to a prompt.\n *\n * @remarks\n *\n * Primarily used for testing but could be used to inject some externally define text into a prompt. The text will be truncated to fit within the `maxTokens` limit.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class TextDataSource implements " + }, + { + "kind": "Reference", + "text": "DataSource", + "canonicalReference": "@microsoft/teams-ai!DataSource:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/dataSources/TextDataSource.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "TextDataSource", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!TextDataSource:constructor(1)", + "docComment": "/**\n * Creates a new `TextDataSource` instance.\n *\n * @param name - Name of the data source.\n *\n * @param text - Text to inject into the prompt.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", text: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "name", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "text", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ] + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TextDataSource#name:member", + "docComment": "/**\n * Name of the data source.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get name(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TextDataSource#renderData:member(1)", + "docComment": "/**\n * Renders the data source as a string of text.\n *\n * @param context - Turn context for the current turn of conversation with the user.\n *\n * @param memory - An interface for accessing state values.\n *\n * @param tokenizer - Tokenizer to use when rendering the data source.\n *\n * @param maxTokens - Maximum number of tokens allowed to be rendered.\n *\n * @returns The text to inject into the prompt as a `RenderedPromptSection` object.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderData(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 13 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderData" + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!TextSection:class", + "docComment": "/**\n * A section of text that will be rendered as a message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class TextSection extends " + }, + { + "kind": "Reference", + "text": "PromptSectionBase", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/TextSection.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "TextSection", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!TextSection:constructor(1)", + "docComment": "/**\n * Creates a new 'TextSection' instance.\n *\n * @param text - Text to use for this section.\n *\n * @param role - Message role to use for this section.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `auto`.\n *\n * @param required - Optional. Indicates if this section is required. Defaults to `true`.\n *\n * @param separator - Optional. Separator to use between sections when rendering as text. Defaults to `\\n`.\n *\n * @param textPrefix - Optional. Prefix to use for text output. Defaults to `undefined`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(text: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", role: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", required?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ", separator?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", textPrefix?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "text", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "role", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + }, + { + "parameterName": "required", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + }, + { + "parameterName": "separator", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": true + }, + { + "parameterName": "textPrefix", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TextSection#renderAsMessages:member(1)", + "docComment": "/**\n * @param context - \n *\n * @param memory - \n *\n * @param functions - \n *\n * @param tokenizer - \n *\n * @param maxTokens - @private\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsMessages" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TextSection#role:member", + "docComment": "/**\n * Message role to use for this section.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly role: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "role", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TextSection#text:member", + "docComment": "/**\n * Text to use for this section.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "readonly text: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "text", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface", + "docComment": "/**\n * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Tokenizer " + } + ], + "fileUrlPath": "src/tokenizers/Tokenizer.ts", + "releaseTag": "Public", + "name": "Tokenizer", + "preserveMemberOrder": false, + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Tokenizer#decode:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "decode(tokens: " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "decode" + }, + { + "kind": "MethodSignature", + "canonicalReference": "@microsoft/teams-ai!Tokenizer#encode:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "encode(text: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "text", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "encode" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!TooManyStepsParameters:interface", + "docComment": "/**\n * Parameters passed to the AI.TooManyStepsActionName action.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface TooManyStepsParameters " + } + ], + "fileUrlPath": "src/AI.ts", + "releaseTag": "Public", + "name": "TooManyStepsParameters", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!TooManyStepsParameters#max_steps:member", + "docComment": "/**\n * Configured maximum number of steps allowed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_steps: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "max_steps", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!TooManyStepsParameters#max_time:member", + "docComment": "/**\n * Configured maximum amount of time allowed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "max_time: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "max_time", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!TooManyStepsParameters#start_time:member", + "docComment": "/**\n * Time the AI system started processing the current activity.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "start_time: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "start_time", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!TooManyStepsParameters#step_count:member", + "docComment": "/**\n * Number of steps that have been executed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "step_count: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "step_count", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@microsoft/teams-ai!TurnEvents:type", + "docComment": "/**\n * Turn event types.\n *\n * @remarks\n *\n * The `beforeTurn` event is triggered before the turn is processed. This allows for the turn state to be modified before the turn is processed. Returning false from the event handler will prevent the turn from being processed.\n *\n * The `afterTurn` event is triggered after the turn is processed. This allows for the turn state to be modified or inspected after the turn is processed. Returning false from the event handler will prevent the turn state from being saved.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export type TurnEvents = " + }, + { + "kind": "Content", + "text": "'beforeTurn' | 'afterTurn'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "src/Application.ts", + "releaseTag": "Public", + "name": "TurnEvents", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!TurnState:class", + "docComment": "/**\n * Represents the turn state for a conversation. Turn state includes conversation state, user state, and temporary state. Provides methods to access, modify, and delete the state objects. @template TConversationState\n *\n * @param TConversationState - The type of the conversation state object.\n *\n * @param TUserState - The type of the user state object.\n *\n * @param TTempState - The type of the temporary state object.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class TurnState implements " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/TurnState.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TConversationState", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "typeParameterName": "TUserState", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "typeParameterName": "TTempState", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + } + } + ], + "isAbstract": false, + "name": "TurnState", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TurnState#conversation:member", + "docComment": "/**\n * Gets the conversation state from the turn state. @template TConversationState\n *\n * @returns {TConversationState} The conversation state.\n *\n * @throws\n *\n * Error if TurnState hasn't been loaded. Call loadState() first.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get conversation(): " + }, + { + "kind": "Content", + "text": "TConversationState" + }, + { + "kind": "Content", + "text": ";\n\nset conversation(value: TConversationState);" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "conversation", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnState#deleteConversationState:member(1)", + "docComment": "/**\n * Deletes the state object for the current conversation from storage.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteConversationState(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "deleteConversationState" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnState#deleteTempState:member(1)", + "docComment": "/**\n * Deletes the temp state object.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteTempState(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "deleteTempState" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnState#deleteUserState:member(1)", + "docComment": "/**\n * Deletes the state object for the current user from storage.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteUserState(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "deleteUserState" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnState#deleteValue:member(1)", + "docComment": "/**\n * Deletes a value from the memory.\n *\n * @param path - Path to the value to delete in the form of `[scope].property`. If scope is omitted, the value is deleted from the temporary scope.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "deleteValue(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "deleteValue" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnState#getScope:member(1)", + "docComment": "/**\n * Gets a state scope by name.\n *\n * @param scope - Name of the state scope to return. (i.e. 'conversation', 'user', or 'temp')\n *\n * @returns {string | undefined} The state scope or undefined if not found.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getScope(scope: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "TurnStateEntry", + "canonicalReference": "@microsoft/teams-ai!TurnStateEntry:class" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "scope", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getScope" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnState#getValue:member(1)", + "docComment": "/**\n * Retrieves a value from the memory. @template TValue\n *\n * @param path - Path to the value to retrieve in the form of `[scope].property`. If scope is omitted, the value is retrieved from the temporary scope.\n *\n * @returns {string} The value or undefined if not found.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "getValue(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "TValue" + }, + { + "kind": "Content", + "text": ";" + } + ], + "typeParameters": [ + { + "typeParameterName": "TValue", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "getValue" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnState#hasValue:member(1)", + "docComment": "/**\n * Checks if a value exists in the memory.\n *\n * @param path - Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope.\n *\n * @returns {boolean} True if the value exists, false otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "hasValue(path: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "hasValue" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TurnState#isLoaded:member", + "docComment": "/**\n * Gets a value indicating whether the applications turn state has been loaded.\n *\n * @returns {boolean} True if the applications turn state has been loaded, false otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get isLoaded(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "isLoaded", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnState#load:member(1)", + "docComment": "/**\n * Loads all of the state scopes for the current turn.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param storage - Optional. Storage provider to load state scopes from.\n *\n * @returns {boolean} True if the states needed to be loaded.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "load(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", storage?: " + }, + { + "kind": "Reference", + "text": "Storage", + "canonicalReference": "botbuilder-core!Storage:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "storage", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "load" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnState#onComputeStorageKeys:member(1)", + "docComment": "/**\n * Computes the storage keys for the state scopes being persisted.\n *\n * @remarks\n *\n * Can be overridden in derived classes to add additional storage scopes.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @returns {Promise>} A dictionary of scope names -> storage keys.\n *\n * @throws\n *\n * Error if the context is missing a required property.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "protected onComputeStorageKeys(context: " + }, { - "tagName": "@alpha", - "syntaxKind": "modifier" + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" }, { - "tagName": "@beta", - "syntaxKind": "modifier" + "kind": "Content", + "text": "): " }, { - "tagName": "@defaultValue", - "syntaxKind": "block" + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" }, { - "tagName": "@decorator", - "syntaxKind": "block", - "allowMultiple": true + "kind": "Content", + "text": "<" }, { - "tagName": "@deprecated", - "syntaxKind": "block" + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" }, { - "tagName": "@eventProperty", - "syntaxKind": "modifier" + "kind": "Content", + "text": ">" }, { - "tagName": "@example", - "syntaxKind": "block", - "allowMultiple": true + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": true, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "onComputeStorageKeys" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnState#save:member(1)", + "docComment": "/**\n * Saves all of the state scopes for the current turn.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param storage - Optional. Storage provider to save state scopes to.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "save(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", storage?: " + }, + { + "kind": "Reference", + "text": "Storage", + "canonicalReference": "botbuilder-core!Storage:interface" + }, + { + "kind": "Content", + "text": "): " }, { - "tagName": "@experimental", - "syntaxKind": "modifier" + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" }, { - "tagName": "@inheritDoc", - "syntaxKind": "inline" + "kind": "Content", + "text": "" }, { - "tagName": "@internal", - "syntaxKind": "modifier" + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false }, { - "tagName": "@label", - "syntaxKind": "inline" + "parameterName": "storage", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "save" + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnState#setValue:member(1)", + "docComment": "/**\n * Assigns a value to the memory.\n *\n * @param path - Path to the value to assign in the form of `[scope].property`. If scope is omitted, the value is assigned to the temporary scope.\n *\n * @param value - Value to assign.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "setValue(path: " }, { - "tagName": "@link", - "syntaxKind": "inline", - "allowMultiple": true + "kind": "Content", + "text": "string" }, { - "tagName": "@override", - "syntaxKind": "modifier" + "kind": "Content", + "text": ", value: " }, { - "tagName": "@packageDocumentation", - "syntaxKind": "modifier" + "kind": "Content", + "text": "unknown" }, { - "tagName": "@param", - "syntaxKind": "block", - "allowMultiple": true + "kind": "Content", + "text": "): " }, { - "tagName": "@privateRemarks", - "syntaxKind": "block" + "kind": "Content", + "text": "void" }, { - "tagName": "@public", - "syntaxKind": "modifier" + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "path", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false }, { - "tagName": "@readonly", - "syntaxKind": "modifier" + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "setValue" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TurnState#temp:member", + "docComment": "/**\n * Accessor for the temp state.\n *\n * @returns {TTempState} The temp TurnState.\n *\n * @throws\n *\n * Error if TurnState hasn't been loaded. Call loadState() first.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get temp(): " }, { - "tagName": "@summary", - "syntaxKind": "block" + "kind": "Content", + "text": "TTempState" }, { - "tagName": "@returns", - "syntaxKind": "block" + "kind": "Content", + "text": ";\n\nset temp(value: TTempState);" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "temp", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TurnState#user:member", + "docComment": "/**\n * Accessor for the user state.\n *\n * @returns {TUserState} The user TurnState.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get user(): " }, { - "tagName": "@sealed", - "syntaxKind": "modifier" + "kind": "Content", + "text": "TUserState" }, { - "tagName": "@see", - "syntaxKind": "block" + "kind": "Content", + "text": ";\n\nset user(value: TUserState);" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "user", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [ + { + "startIndex": 7, + "endIndex": 8 + } + ] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!TurnStateEntry:class", + "docComment": "/**\n * Accessor class for managing an individual state scope.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class TurnStateEntry " + } + ], + "fileUrlPath": "src/TurnState.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "TurnStateEntry", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!TurnStateEntry:constructor(1)", + "docComment": "/**\n * Creates a new instance of the `TurnStateEntry` class.\n *\n * @param value - Optional. Value to initialize the state scope with. The default is an {} object.\n *\n * @param storageKey - Optional. Storage key to use when persisting the state scope.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(value?: " }, { - "tagName": "@throws", - "syntaxKind": "block", - "allowMultiple": true + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" }, { - "tagName": "@typeParam", - "syntaxKind": "block", - "allowMultiple": true + "kind": "Content", + "text": "" }, { - "tagName": "@virtual", - "syntaxKind": "modifier" + "kind": "Content", + "text": ", storageKey?: " }, { - "tagName": "@betaDocumentation", - "syntaxKind": "modifier" + "kind": "Content", + "text": "string" }, { - "tagName": "@internalRemarks", - "syntaxKind": "block" + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": true }, { - "tagName": "@preapproved", - "syntaxKind": "modifier" + "parameterName": "storageKey", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": true } - ], - "supportForTags": { - "@alpha": true, - "@beta": true, - "@defaultValue": true, - "@decorator": true, - "@deprecated": true, - "@eventProperty": true, - "@example": true, - "@experimental": true, - "@inheritDoc": true, - "@internal": true, - "@label": true, - "@link": true, - "@override": true, - "@packageDocumentation": true, - "@param": true, - "@privateRemarks": true, - "@public": true, - "@readonly": true, - "@summary": true, - "@returns": true, - "@sealed": true, - "@see": true, - "@throws": true, - "@typeParam": true, - "@virtual": true, - "@betaDocumentation": true, - "@internalRemarks": true, - "@preapproved": true + ] }, - "reportUnsupportedHtmlElements": false - } - }, - "kind": "Package", - "canonicalReference": "@microsoft/teams-ai!", - "docComment": "", - "name": "@microsoft/teams-ai", - "preserveMemberOrder": false, - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "@microsoft/teams-ai!", - "name": "", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCard:interface", - "docComment": "/**\n * Strongly typed Adaptive Card.\n *\n * @summary\n *\n * see https://adaptivecards.io/explorer/ for schema details.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface AdaptiveCard " - } - ], - "fileUrlPath": "src/AdaptiveCards.ts", - "releaseTag": "Public", - "name": "AdaptiveCard", - "preserveMemberOrder": false, - "members": [ - { - "kind": "IndexSignature", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCard:index(1)", - "docComment": "/**\n * Additional card fields.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "[key: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "]: " - }, - { - "kind": "Content", - "text": "any" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "key", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ] - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCard#type:member", - "docComment": "/**\n * Required type field.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "'AdaptiveCard'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCards:class", - "docComment": "/**\n * AdaptiveCards class to enable fluent style registration of handlers related to Adaptive Cards.\n *\n * @template TState Type of the turn state object being persisted.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class AdaptiveCards " - } - ], - "fileUrlPath": "src/AdaptiveCards.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "AdaptiveCards", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCards:constructor(1)", - "docComment": "/**\n * Creates a new instance of the AdaptiveCards class.\n *\n * @param app - Top level application class to register handlers with.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(app: " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "app", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCards#actionExecute:member(1)", - "docComment": "/**\n * Adds a route to the application for handling Adaptive Card Action.Execute events.\n *\n * @template TData Optional. Type of the data associated with the action.\n *\n * @param verb - The named action(s) to be handled.\n *\n * @param handler - The code to execute when the action is triggered.\n *\n * @param - handler.context The current turn context.\n *\n * @param - handler.state The current turn state.\n *\n * @param - handler.data The data associated with the action.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "actionExecute" - }, - { - "kind": "Content", - "text": ">(verb: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, data: TData) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "AdaptiveCard", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCard:interface" - }, - { - "kind": "Content", - "text": " | string>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "TData", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 22, - "endIndex": 24 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "verb", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 13 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 14, - "endIndex": 21 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "actionExecute" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCards#actionSubmit:member(1)", - "docComment": "/**\n * Adds a route to the application for handling Adaptive Card Action.Submit events.\n *\n * @summary\n *\n * The route will be added for the specified verb(s) and will be filtered using the `actionSubmitFilter` option. The default filter is to use the `verb` field.\n *\n * For outgoing AdaptiveCards you will need to include the verb's name in the cards Action.Submit. For example:\n * ```JSON\n * {\n * \"type\": \"Action.Submit\",\n * \"title\": \"OK\",\n * \"data\": {\n * \"verb\": \"ok\"\n * }\n * }\n * ```\n *\n * @template TData Optional. Type of the data associated with the action.\n *\n * @param verb - The named action(s) to be handled.\n *\n * @param handler - The code to execute when the action is triggered.\n *\n * @param - handler.context The current turn context.\n *\n * @param - handler.state The current turn state.\n *\n * @param - handler.data The data associated with the action.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "actionSubmit" - }, - { - "kind": "Content", - "text": ">(verb: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, data: TData) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "TData", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 20, - "endIndex": 22 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "verb", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 13 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 14, - "endIndex": 19 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "actionSubmit" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCards#search:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "search(dataset: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, query: " - }, - { - "kind": "Reference", - "text": "Query", - "canonicalReference": "@microsoft/teams-ai!Query:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "AdaptiveCardsSearchParams", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsSearchParams:interface" - }, - { - "kind": "Content", - "text": ">) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "AdaptiveCardSearchResult", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCardSearchResult:interface" - }, - { - "kind": "Content", - "text": "[]>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 23, - "endIndex": 25 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "dataset", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 10 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 22 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "search" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCardSearchResult:interface", - "docComment": "/**\n * Individual result returned from AdaptiveCards.search() handler.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface AdaptiveCardSearchResult " - } - ], - "fileUrlPath": "src/AdaptiveCards.ts", - "releaseTag": "Public", - "name": "AdaptiveCardSearchResult", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCardSearchResult#title:member", - "docComment": "/**\n * The title of the result.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "title: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "title", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCardSearchResult#value:member", - "docComment": "/**\n * The subtitle of the result.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "value: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "value", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsOptions:interface", - "docComment": "/**\n * Options for AdaptiveCards class.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface AdaptiveCardsOptions " - } - ], - "fileUrlPath": "src/AdaptiveCards.ts", - "releaseTag": "Public", - "name": "AdaptiveCardsOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsOptions#actionSubmitFilter:member", - "docComment": "/**\n * Data field used to identify the Action.Submit handler to trigger.\n *\n * @summary\n *\n * When an Action.Submit is triggered, the field name specified here will be used to determine the handler to route the request to.\n *\n * Defaults to a value of 'verb'.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "actionSubmitFilter?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "actionSubmitFilter", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsSearchParams:interface", - "docComment": "/**\n * Parameters passed to AdaptiveCards.search() handler.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface AdaptiveCardsSearchParams " - } - ], - "fileUrlPath": "src/AdaptiveCards.ts", - "releaseTag": "Public", - "name": "AdaptiveCardsSearchParams", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsSearchParams#dataset:member", - "docComment": "/**\n * The dataset to search.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "dataset: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "dataset", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsSearchParams#queryText:member", - "docComment": "/**\n * The query text.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "queryText: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "queryText", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!AI:class", - "docComment": "/**\n * AI System.\n *\n * @summary\n *\n * The AI system is responsible for generating plans, moderating input and output, and generating prompts. It can be used free standing or routed to by the Application object.\n *\n * @template TState Optional. Type of the turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class AI " - } - ], - "fileUrlPath": "src/AI.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "isAbstract": false, - "name": "AI", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@microsoft/teams-ai!AI:constructor(1)", - "docComment": "/**\n * Creates a new AI system.\n *\n * @param options - The options used to configure the AI system.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(options: " - }, - { - "kind": "Reference", - "text": "AIOptions", - "canonicalReference": "@microsoft/teams-ai!AIOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AI#action:member(1)", - "docComment": "/**\n * Registers a handler for a named action.\n *\n * @summary\n *\n * The AI systems planner returns plans that are made up of a series of commands or actions that should be performed. Registering a handler lets you provide code that should be run in response to one of the predicted actions.\n *\n * Plans support a DO command which specifies the name of an action to call and an optional set of entities that should be passed to the action. The internal plan executor will call the registered handler for the action passing in the current context, state, and entities.\n *\n * Additionally, the AI system itself uses actions to handle things like unknown actions, flagged input, and flagged output. You can override these actions by registering your own handler for them. The names of the built-in actions are available as static properties on the AI class. @template TEntities (Optional) The type of entities that the action handler expects.\n *\n * @param name - Unique name of the action.\n *\n * @param handler - Function to call when the action is triggered.\n *\n * @param allowOverrides - Optional. If true, this handler is allowed to be overridden. Defaults to false.\n *\n * @returns The AI system instance for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "action | undefined" - }, - { - "kind": "Content", - "text": ">(name: " - }, - { - "kind": "Content", - "text": "string | string[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, entities: TEntities, action?: string) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", allowOverrides?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "TEntities", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 14, - "endIndex": 15 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 11 - }, - "isOptional": false - }, - { - "parameterName": "allowOverrides", - "parameterTypeTokenRange": { - "startIndex": 12, - "endIndex": 13 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "action" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AI#chain:member(1)", - "docComment": "/**\n * Chains into another prompt and executes the plan that is returned.\n *\n * @summary\n *\n * This method is used to chain into another prompt. It will call the prompt manager to get the plan for the prompt and then execute the plan. The return value indicates whether that plan was completely executed or not, and can be used to make decisions about whether the outer plan should continue executing.\n *\n * @param context - Current turn context.\n *\n * @param state - Current turn state.\n *\n * @param prompt - Optional. Prompt name or prompt template to use. If omitted, the AI systems default prompt will be used.\n *\n * @param options - Optional. Override options for the prompt. If omitted, the AI systems configured options will be used.\n *\n * @returns True if the plan was completely executed, otherwise false.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "chain(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", prompt?: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "AIOptions", - "canonicalReference": "@microsoft/teams-ai!AIOptions:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 13, - "endIndex": 15 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "prompt", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": true - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 12 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "chain" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AI#completePrompt:member(1)", - "docComment": "/**\n * A helper method to complete a prompt using the configured prompt manager.\n *\n * @param context - Current turn context.\n *\n * @param state - Current turn state.\n *\n * @param prompt - Prompt name or prompt template to use.\n *\n * @param options - Optional. Override options for the prompt. If omitted, the AI systems configured options will be used.\n *\n * @returns The result of the prompt. If the prompt was not completed (typically due to rate limiting), the return value will be undefined.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "completePrompt(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", prompt: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "AIOptions", - "canonicalReference": "@microsoft/teams-ai!AIOptions:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 13, - "endIndex": 15 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "prompt", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 12 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "completePrompt" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AI#createSemanticFunction:member(1)", - "docComment": "/**\n * Creates a semantic function that can be registered with the apps prompt manager.\n *\n * @summary\n *\n * Semantic functions are functions that make model calls and return their results as template parameters to other prompts. For example, you could define a semantic function called 'translator' that first translates the user's input to English before calling your main prompt:\n * ```JavaScript\n * app.ai.prompts.addFunction('translator', app.ai.createSemanticFunction('translator-prompt'));\n * ```\n *\n * You would then create a prompt called \"translator-prompt\" that does the translation and then in your main prompt you can call it using the template expression `{{translator}}`.\n *\n * @param name - \n *\n * @param template - \n *\n * @param options - \n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "createSemanticFunction(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", template?: " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ", options?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "AIOptions", - "canonicalReference": "@microsoft/teams-ai!AIOptions:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 15 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "template", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createSemanticFunction" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AI#doAction:member(1)", - "docComment": "/**\n * Manually executes a named action.\n *\n * @template TEntities Optional. Type of entities expected to be passed to the action.\n *\n * @param context - Current turn context.\n *\n * @param state - Current turn state.\n *\n * @param action - Name of the action to execute.\n *\n * @param entities - Optional. Entities to pass to the action.\n *\n * @returns True if the action thinks other actions should be executed.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "doAction" - }, - { - "kind": "Content", - "text": ">(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", action: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", entities?: " - }, - { - "kind": "Content", - "text": "TEntities" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "TEntities", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 14 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - }, - { - "parameterName": "action", - "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "isOptional": false - }, - { - "parameterName": "entities", - "parameterTypeTokenRange": { - "startIndex": 10, - "endIndex": 11 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "doAction" - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!AI.DoCommandActionName:member", - "docComment": "/**\n * An action that is called to DO an action.\n *\n * @summary\n *\n * The action system is used to do other actions. Overriding this action lets you customize the execution of an individual action. You can use it to log actions being used or to prevent certain actions from being executed based on policy.\n *\n * The default behavior is to simply execute the action handler passed in so you will need to perform that logic yourself should you override this action.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static readonly DoCommandActionName = " - }, - { - "kind": "Content", - "text": "\"___DO___\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "DoCommandActionName", - "propertyTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!AI.FlaggedInputActionName:member", - "docComment": "/**\n * An action that will be called anytime an input is flagged by the moderator.\n *\n * @summary\n *\n * The default behavior is to simply log an error to the console. Override to send a custom message to the user.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static readonly FlaggedInputActionName = " - }, - { - "kind": "Content", - "text": "\"___FlaggedInput___\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "FlaggedInputActionName", - "propertyTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!AI.FlaggedOutputActionName:member", - "docComment": "/**\n * An action that will be called anytime an output is flagged by the moderator.\n *\n * @summary\n *\n * The default behavior is to simply log an error to the console. Override to send a custom message to the user.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static readonly FlaggedOutputActionName = " - }, - { - "kind": "Content", - "text": "\"___FlaggedOutput___\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "FlaggedOutputActionName", - "propertyTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!AI#moderator:member", - "docComment": "/**\n * Returns the moderator being used by the AI system.\n *\n * @summary\n *\n * The default moderator simply allows all messages and plans through without intercepting them.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get moderator(): " - }, - { - "kind": "Reference", - "text": "Moderator", - "canonicalReference": "@microsoft/teams-ai!Moderator:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "moderator", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!AI#options:member", - "docComment": "/**\n * Returns the configured options for the AI system.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get options(): " - }, - { - "kind": "Reference", - "text": "ConfiguredAIOptions", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "options", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!AI#planner:member", - "docComment": "/**\n * Returns the planner being used by the AI system.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get planner(): " - }, - { - "kind": "Reference", - "text": "Planner", - "canonicalReference": "@microsoft/teams-ai!Planner:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "planner", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!AI.PlanReadyActionName:member", - "docComment": "/**\n * An action that will be called after the plan has been predicted by the planner and it has passed moderation.\n *\n * @summary\n *\n * Overriding this action lets you customize the decision to execute a plan separately from the moderator. The default behavior is to proceed with the plans execution only with a plan contains one or more commands. Returning false from this action can be used to prevent the plan from being executed.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static readonly PlanReadyActionName = " - }, - { - "kind": "Content", - "text": "\"___PlanReady___\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "PlanReadyActionName", - "propertyTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!AI#prompts:member", - "docComment": "/**\n * Returns the prompt manager being used by the AI system.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get prompts(): " - }, - { - "kind": "Reference", - "text": "PromptManager", - "canonicalReference": "@microsoft/teams-ai!PromptManager:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "prompts", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!AI.RateLimitedActionName:member", - "docComment": "/**\n * An action that will be called anytime the planner is rate limited.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static readonly RateLimitedActionName = " - }, - { - "kind": "Content", - "text": "\"___RateLimited___\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "RateLimitedActionName", - "propertyTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!AI.SayCommandActionName:member", - "docComment": "/**\n * An action that is called to SAY something.\n *\n * @summary\n *\n * Overriding this action lets you customize the execution of the SAY command. You can use it to log the output being generated or to add support for sending certain types of output as message attachments.\n *\n * The default behavior attempts to look for an Adaptive Card in the output and if found sends it as an attachment. If no Adaptive Card is found then the output is sent as a plain text message.\n *\n * If you override this action and want to automatically send Adaptive Cards as attachments you will need to handle that yourself.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static readonly SayCommandActionName = " - }, - { - "kind": "Content", - "text": "\"___SAY___\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "SayCommandActionName", - "propertyTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!AI.UnknownActionName:member", - "docComment": "/**\n * An action that will be called anytime an unknown action is predicted by the planner.\n *\n * @summary\n *\n * The default behavior is to simply log an error to the console. The plan is allowed to continue execution by default.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static readonly UnknownActionName = " - }, - { - "kind": "Content", - "text": "\"___UnknownAction___\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "UnknownActionName", - "propertyTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!AIHistoryOptions:interface", - "docComment": "/**\n * Options for configuring the AI systems history options.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface AIHistoryOptions " - } - ], - "fileUrlPath": "src/AI.ts", - "releaseTag": "Public", - "name": "AIHistoryOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIHistoryOptions#assistantHistoryType:member", - "docComment": "/**\n * Whether the conversation history should include the plan object returned by the model or just the text of any SAY commands.\n *\n * @summary\n *\n * Defaults to 'planObject'.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "assistantHistoryType: " - }, - { - "kind": "Content", - "text": "'text' | 'planObject'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "assistantHistoryType", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIHistoryOptions#assistantPrefix:member", - "docComment": "/**\n * The prefix to use for assistant history.\n *\n * @summary\n *\n * Defaults to 'Assistant:'.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "assistantPrefix: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "assistantPrefix", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIHistoryOptions#lineSeparator:member", - "docComment": "/**\n * The line separator to use when concatenating history.\n *\n * @summary\n *\n * Defaults to '\\n'.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "lineSeparator: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "lineSeparator", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIHistoryOptions#maxTokens:member", - "docComment": "/**\n * The maximum number of tokens worth of history to add to the prompt.\n *\n * @summary\n *\n * Defaults to 1000.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "maxTokens: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "maxTokens", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIHistoryOptions#maxTurns:member", - "docComment": "/**\n * The maximum number of turns to remember.\n *\n * @summary\n *\n * Defaults to 3.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "maxTurns: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "maxTurns", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIHistoryOptions#trackHistory:member", - "docComment": "/**\n * Whether the AI system should track conversation history.\n *\n * @summary\n *\n * Defaults to true.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "trackHistory: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "trackHistory", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIHistoryOptions#userPrefix:member", - "docComment": "/**\n * The prefix to use for user history.\n *\n * @summary\n *\n * Defaults to 'User:'.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "userPrefix: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "userPrefix", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!AIOptions:interface", - "docComment": "/**\n * Options for configuring the AI system.\n *\n * @template TState Type of the turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface AIOptions " - } - ], - "fileUrlPath": "src/AI.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "AIOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIOptions#history:member", - "docComment": "/**\n * Optional. The history options to use for the AI system.\n *\n * @summary\n *\n * Defaults to tracking history with a maximum of 3 turns and 1000 tokens per turn.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "history?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "AIHistoryOptions", - "canonicalReference": "@microsoft/teams-ai!AIHistoryOptions:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "history", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIOptions#moderator:member", - "docComment": "/**\n * Optional. The moderator to use for moderating input passed to the model and the output returned by the model.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "moderator?: " - }, - { - "kind": "Reference", - "text": "Moderator", - "canonicalReference": "@microsoft/teams-ai!Moderator:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "moderator", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIOptions#planner:member", - "docComment": "/**\n * The planner to use for generating plans.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "planner: " - }, - { - "kind": "Reference", - "text": "Planner", - "canonicalReference": "@microsoft/teams-ai!Planner:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "planner", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIOptions#prompt:member", - "docComment": "/**\n * Optional. The prompt to use for the current turn.\n *\n * @summary\n *\n * This allows for the use of the AI system in a free standing mode. An exception will be thrown if the AI system is routed to by the Application object and a prompt has not been configured.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "prompt?: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "PromptSelector", - "canonicalReference": "@microsoft/teams-ai!PromptSelector:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "prompt", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AIOptions#promptManager:member", - "docComment": "/**\n * The prompt manager to use for generating prompts.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "promptManager: " - }, - { - "kind": "Reference", - "text": "PromptManager", - "canonicalReference": "@microsoft/teams-ai!PromptManager:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "promptManager", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!Application:class", - "docComment": "/**\n * Application class for routing and processing incoming requests.\n *\n * @summary\n *\n * The Application object replaces the traditional ActivityHandler that a bot would use. It supports a simpler fluent style of authoring bots versus the inheritance based approach used by the ActivityHandler class.\n *\n * Additionally, it has built-in support for calling into the SDK's AI system and can be used to create bots that leverage Large Language Models (LLM) and other AI capabilities. @template TState Optional. Type of the turn state. This allows for strongly typed access to the turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Application " - } - ], - "fileUrlPath": "src/Application.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "isAbstract": false, - "name": "Application", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@microsoft/teams-ai!Application:constructor(1)", - "docComment": "/**\n * Creates a new Application instance.\n *\n * @param options - Optional. Options used to configure the application.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(options?: " - }, - { - "kind": "Reference", - "text": "ApplicationOptions", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": true - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#activity:member(1)", - "docComment": "/**\n * Handles incoming activities of a given type.\n *\n * @param type - Name of the activity type to match or a regular expression to match against the incoming activity type. An array of type names or expression can also be passed in.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @param - handler.context The context object for the turn.\n *\n * @param - handler.state The state object for the turn.\n *\n * @returns The application instance for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "activity(type: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 17, - "endIndex": 18 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 10 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 16 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "activity" - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!Application#adaptiveCards:member", - "docComment": "/**\n * Fluent interface for accessing Adaptive Card specific features.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get adaptiveCards(): " - }, - { - "kind": "Reference", - "text": "AdaptiveCards", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCards:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "adaptiveCards", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#addRoute:member(1)", - "docComment": "/**\n * Adds a new route to the application.\n *\n * @summary\n *\n * Developers won't typically need to call this method directly as it's used internally by all of the fluent interfaces to register routes for their specific activity types.\n *\n * Routes will be matched in the order they're added to the application. The first selector to return `true` when an activity is received will have its handler called.\n *\n * Invoke-based activities receive special treatment and are matched separately as they typically have shorter execution timeouts.\n *\n * @param selector - Function thats used to select a route. The function should return true to trigger the route.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @param isInvokeRoute - Optional. Boolean indicating if the RouteSelector is for an activity that uses \"invoke\" which require special handling. Defaults to `false`.\n *\n * @returns The application instance for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "addRoute(selector: " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Reference", - "text": "RouteHandler", - "canonicalReference": "@microsoft/teams-ai!RouteHandler:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", isInvokeRoute?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "selector", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "isInvokeRoute", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "addRoute" - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!Application#ai:member", - "docComment": "/**\n * Fluent interface for accessing AI specific features.\n *\n * @summary\n *\n * This property is only available if the Application was configured with `ai` options. An exception will be thrown if you attempt to access it otherwise.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get ai(): " - }, - { - "kind": "Reference", - "text": "AI", - "canonicalReference": "@microsoft/teams-ai!AI:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "ai", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#continueConversationAsync:member(1)", - "docComment": "/**\n * Starts a new \"proactive\" session with a conversation the bot is already a member of.\n *\n * @summary\n *\n * Use of the method requires configuration of the Application with the `adapter` and `botAppId` options. An exception will be thrown if either is missing.\n *\n * @param context - Context of the conversation to proactively message. This can be derived from either a TurnContext, ConversationReference, or Activity.\n *\n * @param logic - The bot's logic that should be run using the new proactive turn context.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "continueConversationAsync(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", logic: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "logic", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 8 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "continueConversationAsync" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#continueConversationAsync:member(2)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "continueConversationAsync(conversationReference: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ConversationReference", - "canonicalReference": "botframework-schema!ConversationReference:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ", logic: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 14 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "conversationReference", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "logic", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 11 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "continueConversationAsync" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#continueConversationAsync:member(3)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "continueConversationAsync(activity: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Activity", - "canonicalReference": "botframework-schema!Activity:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ", logic: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 14 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 3, - "parameters": [ - { - "parameterName": "activity", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "logic", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 11 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "continueConversationAsync" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#conversationUpdate:member(1)", - "docComment": "/**\n * Handles conversation update events.\n *\n * @param event - Name of the conversation update event(s) to handle.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @param - handler.context The context object for the turn.\n *\n * @param - handler.state The state object for the turn.\n *\n * @returns The application instance for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "conversationUpdate(event: " - }, - { - "kind": "Reference", - "text": "ConversationUpdateEvents", - "canonicalReference": "@microsoft/teams-ai!ConversationUpdateEvents:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "ConversationUpdateEvents", - "canonicalReference": "@microsoft/teams-ai!ConversationUpdateEvents:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 13 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "event", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 11 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "conversationUpdate" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#message:member(1)", - "docComment": "/**\n * Handles incoming messages with a given keyword.\n *\n * @summary\n *\n * This method provides a simple way to have a bot respond anytime a user sends your bot a message with a specific word or phrase.\n *\n * For example, you can easily clear the current conversation anytime a user sends \"/reset\":\n * ```JavaScript\n * bot.message('/reset', async (context, state) => {\n * await state.conversation.delete();\n * await context.sendActivity(`I have reset your state.`);\n * });\n * ```\n *\n * @param keyword - Substring of text or a regular expression to match against the text of an incoming message. An array of keywords or expression can also be passed in.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @returns The application instance for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "message(keyword: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 17, - "endIndex": 18 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "keyword", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 10 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 16 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "message" - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!Application#messageExtensions:member", - "docComment": "/**\n * Fluent interface for accessing Message Extensions' specific features.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get messageExtensions(): " - }, - { - "kind": "Reference", - "text": "MessageExtensions", - "canonicalReference": "@microsoft/teams-ai!MessageExtensions:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "messageExtensions", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#messageReactions:member(1)", - "docComment": "/**\n * Handles message reaction events.\n *\n * @param event - Name of the message reaction event to handle.\n *\n * @param handler - Function to call when the route is triggered.\n *\n * @returns The application instance for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "messageReactions(event: " - }, - { - "kind": "Reference", - "text": "MessageReactionEvents", - "canonicalReference": "@microsoft/teams-ai!MessageReactionEvents:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "MessageReactionEvents", - "canonicalReference": "@microsoft/teams-ai!MessageReactionEvents:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 13 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "event", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 11 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "messageReactions" - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!Application#options:member", - "docComment": "/**\n * The application's configured options.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get options(): " - }, - { - "kind": "Reference", - "text": "ApplicationOptions", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "options", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#run:member(1)", - "docComment": "/**\n * Dispatches an incoming activity to a handler registered with the application.\n *\n * @summary\n *\n * This method should be called from your bot's \"turn handler\" (its primary message handler)\n * ```JavaScript\n * server.post('/api/messages', (req, res) => {\n * adapter.processActivity(req, res, async (context) => {\n * await bot.run(context);\n * });\n * });\n * ```\n *\n * @param turnContext - Context class for the current turn of conversation with the user.\n *\n * @returns True if the activity was successfully dispatched to a handler. False if no matching handlers could be found.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "run(turnContext: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "turnContext", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "run" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#sendProactiveActivity:member(1)", - "docComment": "/**\n * Sends a proactive activity to an existing conversation the bot is a member of.\n *\n * @summary\n *\n * This method provides a simple way to send a proactive message to a conversation the bot is a member of.\n *\n * Use of the method requires you configure the Application with the `adapter` and `botAppId` options. An exception will be thrown if either is missing.\n *\n * @param context - Context of the conversation to proactively message. This can be derived from either a TurnContext, ConversationReference, or Activity.\n *\n * @param activityOrText - Activity or message to send to the conversation.\n *\n * @param speak - Optional. Text to speak for channels that support voice.\n *\n * @param inputHint - Optional. Input hint for channels that support voice.\n *\n * @returns A Resource response containing the ID of the activity that was sent.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "sendProactiveActivity(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", activityOrText: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Activity", - "canonicalReference": "botframework-schema!Activity:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ", speak?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", inputHint?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ResourceResponse", - "canonicalReference": "botframework-schema!ResourceResponse:interface" - }, - { - "kind": "Content", - "text": " | undefined>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 13, - "endIndex": 17 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "activityOrText", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 8 - }, - "isOptional": false - }, - { - "parameterName": "speak", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "isOptional": true - }, - { - "parameterName": "inputHint", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "sendProactiveActivity" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#sendProactiveActivity:member(2)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "sendProactiveActivity(conversationReference: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ConversationReference", - "canonicalReference": "botframework-schema!ConversationReference:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ", activityOrText: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Activity", - "canonicalReference": "botframework-schema!Activity:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ", speak?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", inputHint?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ResourceResponse", - "canonicalReference": "botframework-schema!ResourceResponse:interface" - }, - { - "kind": "Content", - "text": " | undefined>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 16, - "endIndex": 20 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "conversationReference", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "activityOrText", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 11 - }, - "isOptional": false - }, - { - "parameterName": "speak", - "parameterTypeTokenRange": { - "startIndex": 12, - "endIndex": 13 - }, - "isOptional": true - }, - { - "parameterName": "inputHint", - "parameterTypeTokenRange": { - "startIndex": 14, - "endIndex": 15 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "sendProactiveActivity" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#sendProactiveActivity:member(3)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "sendProactiveActivity(activity: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Activity", - "canonicalReference": "botframework-schema!Activity:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ", activityOrText: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Activity", - "canonicalReference": "botframework-schema!Activity:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ", speak?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", inputHint?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ResourceResponse", - "canonicalReference": "botframework-schema!ResourceResponse:interface" - }, - { - "kind": "Content", - "text": " | undefined>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 16, - "endIndex": 20 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 3, - "parameters": [ - { - "parameterName": "activity", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "activityOrText", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 11 - }, - "isOptional": false - }, - { - "parameterName": "speak", - "parameterTypeTokenRange": { - "startIndex": 12, - "endIndex": 13 - }, - "isOptional": true - }, - { - "parameterName": "inputHint", - "parameterTypeTokenRange": { - "startIndex": 14, - "endIndex": 15 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "sendProactiveActivity" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#startTypingTimer:member(1)", - "docComment": "/**\n * Manually start a timer to periodically send \"typing\" activities.\n *\n * @summary\n *\n * The timer waits 1000ms to send its initial \"typing\" activity and then send an additional \"typing\" activity every 1000ms. The timer will automatically end once an outgoing activity has been sent. If the timer is already running or the current activity, is not a \"message\" the call is ignored.\n *\n * @param context - The context for the current turn with the user.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "startTypingTimer(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "startTypingTimer" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#stopTypingTimer:member(1)", - "docComment": "/**\n * Manually stop the typing timer.\n *\n * @summary\n *\n * If the timer isn't running nothing happens.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "stopTypingTimer(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "stopTypingTimer" - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!Application#taskModules:member", - "docComment": "/**\n * Fluent interface for accessing Task Module specific features.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get taskModules(): " - }, - { - "kind": "Reference", - "text": "TaskModules", - "canonicalReference": "@microsoft/teams-ai!TaskModules:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "taskModules", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!Application#turn:member(1)", - "docComment": "/**\n * Registers a turn event handler.\n *\n * @summary\n *\n * Turn events let you do something before or after a turn is run. Returning false from `beforeTurn` lets you prevent the turn from running and returning false from `afterTurn` lets you prevent the bots state from being saved.\n *\n * Returning false from `beforeTurn` does result in the bots state being saved which lets you track the reason why the turn was not processed. It also means you can use `beforeTurn` as a way to call into the dialog system. For example, you could use the OAuthPrompt to sign the user in before allowing the AI system to run.\n *\n * @param event - Name of the turn event to handle.\n *\n * @param handler - Function to call when the event is triggered.\n *\n * @returns The application instance for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "turn(event: " - }, - { - "kind": "Reference", - "text": "TurnEvents", - "canonicalReference": "@microsoft/teams-ai!TurnEvents:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TurnEvents", - "canonicalReference": "@microsoft/teams-ai!TurnEvents:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 13 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "event", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 11 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "turn" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions:interface", - "docComment": "/**\n * Options for the Application class.\n *\n * @template TState Type of the turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface ApplicationOptions " - } - ], - "fileUrlPath": "src/Application.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "ApplicationOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#adapter:member", - "docComment": "/**\n * Optional. Bot adapter being used.\n *\n * @summary\n *\n * If using the `longRunningMessages` option or calling the continueConversationAsync() method, this property is required.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "adapter?: " - }, - { - "kind": "Reference", - "text": "BotAdapter", - "canonicalReference": "botbuilder-core!BotAdapter:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "adapter", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#adaptiveCards:member", - "docComment": "/**\n * Optional. Options used to customize the processing of Adaptive Card requests.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "adaptiveCards?: " - }, - { - "kind": "Reference", - "text": "AdaptiveCardsOptions", - "canonicalReference": "@microsoft/teams-ai!AdaptiveCardsOptions:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "adaptiveCards", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#ai:member", - "docComment": "/**\n * Optional. AI options to use. When provided, a new instance of the AI system will be created.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "ai?: " - }, - { - "kind": "Reference", - "text": "AIOptions", - "canonicalReference": "@microsoft/teams-ai!AIOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "ai", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#botAppId:member", - "docComment": "/**\n * Optional. Application ID of the bot.\n *\n * @summary\n *\n * If using the `longRunningMessages` option or calling the continueConversationAsync() method, this property is required.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "botAppId?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "botAppId", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#longRunningMessages:member", - "docComment": "/**\n * Optional. If true, the bot supports long running messages that can take longer then the 10 - 15 second timeout imposed by most channels. Defaults to false.\n *\n * @summary\n *\n * This works by immediately converting the incoming request to a proactive conversation. Care should be used for bots that operate in a shared hosting environment. The incoming request is immediately completed and many shared hosting environments will mark the bot's process as idle and shut it down.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "longRunningMessages?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "longRunningMessages", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#removeRecipientMention:member", - "docComment": "/**\n * Optional. If true, the bot will automatically remove mentions of the bot's name from incoming messages. Defaults to true.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "removeRecipientMention?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "removeRecipientMention", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#startTypingTimer:member", - "docComment": "/**\n * Optional. If true, the bot will automatically start a typing timer when messages are received. This allows the bot to automatically indicate that it's received the message and is processing the request. Defaults to true.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "startTypingTimer?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "startTypingTimer", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#storage:member", - "docComment": "/**\n * Optional. Storage provider to use for the application.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "storage?: " - }, - { - "kind": "Reference", - "text": "Storage", - "canonicalReference": "botbuilder-core!Storage:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "storage", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#taskModules:member", - "docComment": "/**\n * Optional. Options used to customize the processing of task module requests.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "taskModules?: " - }, - { - "kind": "Reference", - "text": "TaskModulesOptions", - "canonicalReference": "@microsoft/teams-ai!TaskModulesOptions:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "taskModules", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ApplicationOptions#turnStateManager:member", - "docComment": "/**\n * Optional. Turn state manager to use. If omitted, an instance of DefaultTurnStateManager will be created.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "turnStateManager?: " - }, - { - "kind": "Reference", - "text": "TurnStateManager", - "canonicalReference": "@microsoft/teams-ai!TurnStateManager:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "turnStateManager", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator:class", - "docComment": "/**\n * An Azure OpenAI moderator that uses OpenAI's moderation API to review prompts and plans for safety.\n *\n * @summary\n *\n * This moderation can be configured to review the input from the user, output from the model, or both. @template TState Optional. Type of the applications turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class AzureContentSafetyModerator extends " - }, - { - "kind": "Reference", - "text": "OpenAIModerator", - "canonicalReference": "@microsoft/teams-ai!OpenAIModerator:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/AzureContentSafetyModerator.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "isAbstract": false, - "name": "AzureContentSafetyModerator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator:constructor(1)", - "docComment": "/**\n * Creates a new instance of the OpenAI based moderator.\n *\n * @param options - Configuration options for the moderator.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(options: " - }, - { - "kind": "Reference", - "text": "AzureOpenAIModeratorOptions", - "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModeratorOptions:interface" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator#createClient:member(1)", - "docComment": "/**\n * Creates a new instance of the Azure OpenAI client.\n *\n * @protected\n *\n * @param options - The options for the moderator.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "protected createClient(options: " - }, - { - "kind": "Reference", - "text": "OpenAIModeratorOptions", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "AzureOpenAIClient", - "canonicalReference": "@microsoft/teams-ai!~AzureOpenAIClient:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": true, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createClient" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator#createModeration:member(1)", - "docComment": "/**\n * @protected\n *\n * @summary\n *\n * This method is called by the moderator to moderate the input. @template TState Optional. Type of the applications turn state.\n *\n * @param input - The input to moderate.\n *\n * @returns The moderation results.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "protected createModeration(input: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "CreateModerationResponseResultsInner", - "canonicalReference": "@microsoft/teams-ai!~CreateModerationResponseResultsInner:interface" - }, - { - "kind": "Content", - "text": " | undefined>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": true, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "input", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createModeration" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator#reviewPlan:member(1)", - "docComment": "/**\n * Reviews the SAY commands generated by the planner for safety violations.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param plan - Plan generated by the planner.\n *\n * @returns The plan to execute. Either the current plan passed in for review or a new plan.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "reviewPlan(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", plan: " - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "plan", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "reviewPlan" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AzureContentSafetyModerator#reviewPrompt:member(1)", - "docComment": "/**\n * Reviews an incoming utterance for safety violations.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param prompt - Generated prompt to be reviewed.\n *\n * @param options - Current options for the AI system.\n *\n * @returns An undefined value to approve the prompt or a new plan to redirect to if not approved.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "reviewPrompt(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", prompt: " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ", options: " - }, - { - "kind": "Reference", - "text": "ConfiguredAIOptions", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": " | undefined>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 14 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "prompt", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "reviewPrompt" - } - ], - "extendsTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModeratorOptions:interface", - "docComment": "/**\n * Options for the OpenAI based moderator.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface AzureOpenAIModeratorOptions extends " - }, - { - "kind": "Reference", - "text": "OpenAIModeratorOptions", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/AzureContentSafetyModerator.ts", - "releaseTag": "Public", - "name": "AzureOpenAIModeratorOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AzureOpenAIModeratorOptions#categories:member", - "docComment": "/**\n * Optional: Azure OpenAI Content Safety Categories Allowed values: \"Hate\", \"Sexual\", \"SelfHarm\", \"Violence\"\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "categories?: " - }, - { - "kind": "Reference", - "text": "AzureOpenAIModeratorCategory", - "canonicalReference": "@microsoft/teams-ai!~AzureOpenAIModeratorCategory:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "categories", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 2 - } - ] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!AzureOpenAIPlanner:class", - "docComment": "/**\n * Planner that uses the Azure OpenAI service.\n *\n * @template TState Optional. Type of the applications turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class AzureOpenAIPlanner extends " - }, - { - "kind": "Reference", - "text": "OpenAIPlanner", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlanner:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/AzureOpenAIPlanner.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "isAbstract": false, - "name": "AzureOpenAIPlanner", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!AzureOpenAIPlanner#createClient:member(1)", - "docComment": "/**\n * @param options - @private\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "protected createClient(options: " - }, - { - "kind": "Reference", - "text": "AzureOpenAIPlannerOptions", - "canonicalReference": "@microsoft/teams-ai!AzureOpenAIPlannerOptions:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "OpenAIClient", - "canonicalReference": "@microsoft/teams-ai!~OpenAIClient:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": true, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createClient" - } - ], - "extendsTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "implementsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!AzureOpenAIPlannerOptions:interface", - "docComment": "/**\n * Additional options needed to use the Azure OpenAI service.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface AzureOpenAIPlannerOptions extends " - }, - { - "kind": "Reference", - "text": "OpenAIPlannerOptions", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlannerOptions:interface" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/AzureOpenAIPlanner.ts", - "releaseTag": "Public", - "name": "AzureOpenAIPlannerOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AzureOpenAIPlannerOptions#apiVersion:member", - "docComment": "/**\n * Optional. Which Azure API version to use. Defaults to latest.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "apiVersion?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "apiVersion", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!AzureOpenAIPlannerOptions#endpoint:member", - "docComment": "/**\n * Endpoint for your Azure OpenAI deployment.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "endpoint: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "endpoint", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 2 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!CompletionConfig:interface", - "docComment": "/**\n * Interface for the completion configuration portion of a prompt template.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface CompletionConfig " - } - ], - "fileUrlPath": "src/Prompts.ts", - "releaseTag": "Public", - "name": "CompletionConfig", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!CompletionConfig#frequency_penalty:member", - "docComment": "/**\n * The models frequency_penalty as a number between 0 and 1.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "frequency_penalty: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "frequency_penalty", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!CompletionConfig#max_tokens:member", - "docComment": "/**\n * The maximum number of tokens to generate.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "max_tokens: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "max_tokens", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!CompletionConfig#presence_penalty:member", - "docComment": "/**\n * The models presence_penalty as a number between 0 and 1.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "presence_penalty: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "presence_penalty", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!CompletionConfig#stop_sequences:member", - "docComment": "/**\n * Optional. Array of stop sequences that when hit will stop generation.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "stop_sequences?: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "stop_sequences", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!CompletionConfig#temperature:member", - "docComment": "/**\n * The models temperature as a number between 0 and 1.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "temperature: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "temperature", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!CompletionConfig#top_p:member", - "docComment": "/**\n * The models top_p as a number between 0 and 1.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "top_p: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "top_p", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions:interface", - "docComment": "/**\n * The configured options for the AI system after all defaults have been applied.\n *\n * @template TState Type of the turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface ConfiguredAIOptions " - } - ], - "fileUrlPath": "src/AI.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "ConfiguredAIOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions#history:member", - "docComment": "/**\n * The history options being used by the AI system.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "history: " - }, - { - "kind": "Reference", - "text": "AIHistoryOptions", - "canonicalReference": "@microsoft/teams-ai!AIHistoryOptions:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "history", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions#moderator:member", - "docComment": "/**\n * The moderator being used for moderating input passed to the model and the output\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "moderator: " - }, - { - "kind": "Reference", - "text": "Moderator", - "canonicalReference": "@microsoft/teams-ai!Moderator:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "moderator", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions#planner:member", - "docComment": "/**\n * The planner being used for generating plans.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "planner: " - }, - { - "kind": "Reference", - "text": "Planner", - "canonicalReference": "@microsoft/teams-ai!Planner:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "planner", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions#prompt:member", - "docComment": "/**\n * Optional prompt to use by default.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "prompt?: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": " | ((Context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": ")" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "prompt", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions#promptManager:member", - "docComment": "/**\n * The prompt manager being used for generating prompts.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "promptManager: " - }, - { - "kind": "Reference", - "text": "PromptManager", - "canonicalReference": "@microsoft/teams-ai!PromptManager:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "promptManager", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory:class", - "docComment": "/**\n * Utility class used to manage the persistance of conversation history.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ConversationHistory " - } - ], - "fileUrlPath": "src/ConversationHistory.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "ConversationHistory", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.addLine:member(1)", - "docComment": "/**\n * Adds a new line of text to conversation history\n *\n * @param state - Applications turn state.\n *\n * @param line - Line of text to add to history.\n *\n * @param maxLines - Optional. Maximum number of lines to store. Defaults to 10.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static addLine(state: " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": ", line: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", maxLines?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "line", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "maxLines", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "addLine" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.appendToLastLine:member(1)", - "docComment": "/**\n * Appends additional text to the last line of conversation history.\n *\n * @param state - Applications turn state.\n *\n * @param text - Text to add to the last line.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static appendToLastLine(state: " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": ", text: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "text", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "appendToLastLine" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.clear:member(1)", - "docComment": "/**\n * Clears all conversation history for the current conversation.\n *\n * @param state - Applications turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static clear(state: " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "clear" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.getLastLine:member(1)", - "docComment": "/**\n * Returns the last line of history.\n *\n * @param state - Applications turn state.\n *\n * @returns The last line of history or an empty string.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static getLastLine(state: " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getLastLine" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.getLastSay:member(1)", - "docComment": "/**\n * Searches the history to find the last SAY response from the assistant.\n *\n * @param state - Applications turn state.\n *\n * @returns Last thing said by the assistant. Defaults to an empty string.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static getLastSay(state: " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "getLastSay" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.hasMoreLines:member(1)", - "docComment": "/**\n * Checks to see if one or more lines of history has persisted.\n *\n * @param state - Applications turn state.\n *\n * @returns True if there are 1 or more lines of history.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static hasMoreLines(state: " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "hasMoreLines" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.removeLastLine:member(1)", - "docComment": "/**\n * Removes the last line from the conversation history.\n *\n * @param state - Applications turn state.\n *\n * @returns The removed line or undefined.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static removeLastLine(state: " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "removeLastLine" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.replaceLastLine:member(1)", - "docComment": "/**\n * Replaces the last line of history with a new line.\n *\n * @param state - Applications turn state.\n *\n * @param line - New line of history.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static replaceLastLine(state: " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": ", line: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "line", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "replaceLastLine" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.replaceLastSay:member(1)", - "docComment": "/**\n * Replaces the last SAY with a new response.\n *\n * @param state - Applications turn state.\n *\n * @param newResponse - New response from the assistant.\n *\n * @param assistantPrefix - Prefix for when a new line needs to be inserted. Defaults to 'Assistant:'.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static replaceLastSay(state: " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": ", newResponse: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", assistantPrefix?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "newResponse", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "assistantPrefix", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "replaceLastSay" - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.StatePropertyName:member", - "docComment": "/**\n * Name of the conversation state property used to hold the list of entires.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static readonly StatePropertyName = " - }, - { - "kind": "Content", - "text": "\"__history__\"" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "StatePropertyName", - "propertyTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": true, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.toArray:member(1)", - "docComment": "/**\n * Returns the current conversation history as an array of lines.\n *\n * @param state - The Application's turn state.\n *\n * @param maxTokens - Optional. Maximum length of the text to include. Defaults to 1000 tokens.\n *\n * @returns The most recent lines of conversation history as an array.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static toArray(state: " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": ", maxTokens?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "maxTokens", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toArray" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ConversationHistory.toString:member(1)", - "docComment": "/**\n * Returns the current conversation history as a string of text.\n *\n * @summary\n *\n * The length of the returned text is gated by `maxCharacterLength` and only whole lines of history entries will be returned. That means that if the length of the most recent history entry is greater then `maxCharacterLength`, no text will be returned.\n *\n * @param state - Application's turn state.\n *\n * @param maxTokens - Optional. Maximum length of the text returned. Defaults to 1000 tokens.\n *\n * @param lineSeparator - Optional. Separator used between lines. Defaults to '\\n'.\n *\n * @returns The most recent lines of conversation history as a text string.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static toString(state: " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": ", maxTokens?: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", lineSeparator?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "maxTokens", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - }, - { - "parameterName": "lineSeparator", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "toString" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@microsoft/teams-ai!ConversationUpdateEvents:type", - "docComment": "/**\n * Conversation update events.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type ConversationUpdateEvents = " - }, - { - "kind": "Content", - "text": "'channelCreated' | 'channelRenamed' | 'channelDeleted' | 'channelRestored' | 'membersAdded' | 'membersRemoved' | 'teamRenamed' | 'teamDeleted' | 'teamArchived' | 'teamUnarchived' | 'teamRestored'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/Application.ts", - "releaseTag": "Public", - "name": "ConversationUpdateEvents", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#delete:member(1)", + "docComment": "/**\n * Clears the state scope.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "delete(): " }, { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!DefaultConversationState:interface", - "docComment": "/**\n * Default conversation state\n *\n * @summary\n *\n * Inherit a new interface from this base interface to strongly type the applications conversation state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface DefaultConversationState " - } - ], - "fileUrlPath": "src/DefaultTurnStateManager.ts", - "releaseTag": "Public", - "name": "DefaultConversationState", - "preserveMemberOrder": false, - "members": [], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!DefaultModerator:class", - "docComment": "/**\n * Default moderator created by the AI system if one isn't configured.\n *\n * @summary\n *\n * The default moderator is a pass-through and always approves all inputs and outputs. @template TState Optional. The Application's turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class DefaultModerator implements " - }, - { - "kind": "Reference", - "text": "Moderator", - "canonicalReference": "@microsoft/teams-ai!Moderator:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/DefaultModerator.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "isAbstract": false, - "name": "DefaultModerator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!DefaultModerator#reviewPlan:member(1)", - "docComment": "/**\n * Allows all plans by returning the plan as-is.\n *\n * @param context - \n *\n * @param state - \n *\n * @param plan - \n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "reviewPlan(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", plan: " - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "plan", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "reviewPlan" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!DefaultModerator#reviewPrompt:member(1)", - "docComment": "/**\n * Allows all prompts by returning undefined.\n *\n * @param context - \n *\n * @param state - \n *\n * @param prompt - \n *\n * @param options - \n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "reviewPrompt(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", prompt: " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ", options: " - }, - { - "kind": "Reference", - "text": "ConfiguredAIOptions", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": " | undefined>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 14 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "prompt", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "reviewPrompt" - } - ], - "implementsTokenRanges": [ - { - "startIndex": 5, - "endIndex": 7 - } - ] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!DefaultPromptManager:class", - "docComment": "/**\n * A filesystem based prompt manager.\n *\n * @summary\n *\n * The default prompt manager uses the file system to define prompts that are compatible with Microsoft's Semantic Kernel SDK (see: https://github.com/microsoft/semantic-kernel)\n *\n * Each prompt is a separate folder under a root prompts folder. The folder should contain 2 files:\n *\n * - \"config.json\": contains the prompts configuration and is a serialized instance of `PromptTemplateConfig`. - \"skprompt.txt\": contains the text of the prompt and supports Semantic Kernels prompt template syntax.\n *\n * Prompts can be loaded and used by name and new dynamically defined prompt templates can be registered with the prompt manager. @template TState Optional. Type of the applications turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class DefaultPromptManager implements " - }, - { - "kind": "Reference", - "text": "PromptManager", - "canonicalReference": "@microsoft/teams-ai!PromptManager:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/DefaultPromptManager.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "isAbstract": false, - "name": "DefaultPromptManager", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@microsoft/teams-ai!DefaultPromptManager:constructor(1)", - "docComment": "/**\n * Constructs a new instance of the `DefaultPromptManager` class\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(options: " - }, - { - "kind": "Reference", - "text": "DefaultPromptManagerOptions", - "canonicalReference": "@microsoft/teams-ai!DefaultPromptManagerOptions:interface" - }, - { - "kind": "Content", - "text": " | string" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!DefaultPromptManager#addFunction:member(1)", - "docComment": "/**\n * Adds a custom function to the prompt manager.\n *\n * @summary\n *\n * Functions can be used with a prompt template using a syntax of `{{name}}`. Function arguments are not currently supported.\n *\n * @param name - The name of the function.\n *\n * @param handler - Promise to return on function name match.\n *\n * @param allowOverrides - Whether to allow overriding an existing function.\n *\n * @returns The prompt manager for chaining.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "addFunction(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", allowOverrides?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 8 - }, - "isOptional": false - }, - { - "parameterName": "allowOverrides", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "addFunction" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!DefaultPromptManager#addPromptTemplate:member(1)", - "docComment": "/**\n * Adds a prompt template to the prompt manager.\n *\n * @summary\n *\n * The template will be pre-parsed and cached for use when the template is rendered by name.\n *\n * @param name - Name of the prompt template.\n *\n * @param template - Prompt template to add.\n *\n * @returns The prompt manager for chaining.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "addPromptTemplate(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", template: " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "template", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "addPromptTemplate" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!DefaultPromptManager#invokeFunction:member(1)", - "docComment": "/**\n * Invokes a function by name.\n *\n * @param context - Current application turn context.\n *\n * @param state - Current turn state.\n *\n * @param name - Name of the function to invoke.\n *\n * @returns The result returned by the function for insertion into a prompt.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "invokeFunction(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "invokeFunction" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!DefaultPromptManager#loadPromptTemplate:member(1)", - "docComment": "/**\n * Loads a named prompt template from the filesystem.\n *\n * @summary\n *\n * The template will be pre-parsed and cached for use when the template is rendered by name.\n *\n * @param name - Name of the template to load.\n *\n * @returns The loaded and parsed prompt template.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "loadPromptTemplate(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "loadPromptTemplate" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!DefaultPromptManager#renderPrompt:member(1)", - "docComment": "/**\n * Renders a prompt template by name.\n *\n * @summary\n *\n * The prompt will be automatically loaded from disk if needed and cached for future use.\n *\n * @param context - Current application turn context.\n *\n * @param state - Current turn state.\n *\n * @param nameOrTemplate - Name of the prompt template to render or a prompt template to render.\n *\n * @returns The rendered prompt template.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "renderPrompt(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", nameOrTemplate: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 12 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "nameOrTemplate", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "renderPrompt" - } - ], - "implementsTokenRanges": [ - { - "startIndex": 5, - "endIndex": 7 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!DefaultPromptManagerOptions:interface", - "docComment": "/**\n * Options used to configure the default prompt manager.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface DefaultPromptManagerOptions " - } - ], - "fileUrlPath": "src/DefaultPromptManager.ts", - "releaseTag": "Public", - "name": "DefaultPromptManagerOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!DefaultPromptManagerOptions#promptsFolder:member", - "docComment": "/**\n * Path to the filesystem folder containing all the applications prompts.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "promptsFolder: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "promptsFolder", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!DefaultTempState:interface", - "docComment": "/**\n * Default temp state\n *\n * @summary\n *\n * Inherit a new interface from this base interface to strongly type the applications temp state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface DefaultTempState " - } - ], - "fileUrlPath": "src/DefaultTurnStateManager.ts", - "releaseTag": "Public", - "name": "DefaultTempState", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!DefaultTempState#history:member", - "docComment": "/**\n * Formatted conversation history for embedding in an AI prompt\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "history: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "history", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!DefaultTempState#input:member", - "docComment": "/**\n * Input passed to an AI prompt\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "input: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "input", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!DefaultTempState#output:member", - "docComment": "/**\n * Output returned from an AI prompt or function\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "output: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "output", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!DefaultTurnState:interface", - "docComment": "/**\n * Defines the default state scopes persisted by the `DefaultTurnStateManager`.\n *\n * @template TConversationState Optional. Type of the conversation state object being persisted. @template TUserState Optional. Type of the user state object being persisted. @template TTempState Optional. Type of the temp state object being persisted.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface DefaultTurnState extends " - }, - { - "kind": "Reference", - "text": "TurnState", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/DefaultTurnStateManager.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TConversationState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "TUserState", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - }, - { - "typeParameterName": "TTempState", - "constraintTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "defaultTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - } - } - ], - "name": "DefaultTurnState", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!DefaultTurnState#conversation:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "conversation: " - }, - { - "kind": "Reference", - "text": "TurnStateEntry", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "conversation", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!DefaultTurnState#temp:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "temp: " - }, - { - "kind": "Reference", - "text": "TurnStateEntry", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "temp", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!DefaultTurnState#user:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "user: " - }, - { - "kind": "Reference", - "text": "TurnStateEntry", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "user", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 13, - "endIndex": 14 - } - ] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!DefaultTurnStateManager:class", - "docComment": "/**\n * Default turn state manager implementation.\n *\n * @template TConversationState Optional. Type of the conversation state object being persisted. @template TUserState Optional. Type of the user state object being persisted. @template TTempState Optional. Type of the temp state object being persisted.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class DefaultTurnStateManager implements " - }, - { - "kind": "Reference", - "text": "TurnStateManager", - "canonicalReference": "@microsoft/teams-ai!TurnStateManager:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "DefaultTurnState", - "canonicalReference": "@microsoft/teams-ai!DefaultTurnState:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/DefaultTurnStateManager.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TConversationState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "TUserState", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - }, - { - "typeParameterName": "TTempState", - "constraintTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "defaultTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - } - } - ], - "isAbstract": false, - "name": "DefaultTurnStateManager", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!DefaultTurnStateManager#loadState:member(1)", - "docComment": "/**\n * Loads all of the state scopes for the current turn.\n *\n * @param storage - Storage provider to load state scopes from.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @returns The loaded state scopes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "loadState(storage: " - }, - { - "kind": "Reference", - "text": "Storage", - "canonicalReference": "botbuilder-core!Storage:interface" - }, - { - "kind": "Content", - "text": ", context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "DefaultTurnState", - "canonicalReference": "@microsoft/teams-ai!DefaultTurnState:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "storage", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "loadState" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!DefaultTurnStateManager#saveState:member(1)", - "docComment": "/**\n * Saves all of the state scopes for the current turn.\n *\n * @param storage - Storage provider to save state scopes to.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param state - State scopes to save.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "saveState(storage: " - }, - { - "kind": "Reference", - "text": "Storage", - "canonicalReference": "botbuilder-core!Storage:interface" - }, - { - "kind": "Content", - "text": ", context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Reference", - "text": "DefaultTurnState", - "canonicalReference": "@microsoft/teams-ai!DefaultTurnState:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "storage", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "saveState" - } - ], - "implementsTokenRanges": [ - { - "startIndex": 13, - "endIndex": 17 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!DefaultUserState:interface", - "docComment": "/**\n * Default user state\n *\n * @summary\n *\n * Inherit a new interface from this base interface to strongly type the applications user state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface DefaultUserState " - } - ], - "fileUrlPath": "src/DefaultTurnStateManager.ts", - "releaseTag": "Public", - "name": "DefaultUserState", - "preserveMemberOrder": false, - "members": [], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!MessageExtensions:class", - "docComment": "/**\n * MessageExtensions class to enable fluent style registration of handlers related to Message Extensions.\n *\n * @template TState Type of the turn state object being persisted.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class MessageExtensions " - } - ], - "fileUrlPath": "src/MessageExtensions.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "MessageExtensions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@microsoft/teams-ai!MessageExtensions:constructor(1)", - "docComment": "/**\n * Creates a new instance of the MessageExtensions class.\n *\n * @param app - Top level application class to register handlers with.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(app: " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "app", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!MessageExtensions#anonymousQueryLink:member(1)", - "docComment": "/**\n * Registers a handler for a command that performs anonymous link unfurling.\n *\n * @param commandId - ID of the command(s) to register the handler for.\n *\n * @param handler - Function to call when the command is received. The handler should return a `MessagingExtensionResult`.\n *\n * @param - handler.context Context for the current turn of conversation with the user.\n *\n * @param - handler.state Current state of the turn.\n *\n * @param - handler.url URL to unfurl.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "anonymousQueryLink(commandId: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, url: string) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "MessagingExtensionResult", - "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 19, - "endIndex": 21 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "commandId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 10 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 18 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "anonymousQueryLink" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!MessageExtensions#botMessagePreviewEdit:member(1)", - "docComment": "/**\n * Registers a handler to process the 'edit' action of a message that's being previewed by the user prior to sending.\n *\n * @summary\n *\n * This handler is called when the user clicks the 'Edit' button on a message that's being previewed prior to insertion into the current chat. The handler should return a new view that allows the user to edit the message.\n *\n * @param commandId - ID of the command(s) to register the handler for.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - handler.context Context for the current turn of conversation with the user.\n *\n * @param - handler.state Current state of the turn.\n *\n * @param - handler.previewActivity The activity that's being previewed by the user.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "botMessagePreviewEdit(commandId: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, previewActivity: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Activity", - "canonicalReference": "botframework-schema!Activity:interface" - }, - { - "kind": "Content", - "text": ">) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "MessagingExtensionResult", - "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TaskModuleTaskInfo", - "canonicalReference": "botframework-schema!TaskModuleTaskInfo:interface" - }, - { - "kind": "Content", - "text": " | string | null | undefined>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 25, - "endIndex": 27 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "commandId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 10 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 24 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "botMessagePreviewEdit" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!MessageExtensions#botMessagePreviewSend:member(1)", - "docComment": "/**\n * Registers a handler to process the 'send' action of a message that's being previewed by the user prior to sending.\n *\n * @summary\n *\n * This handler is called when the user clicks the 'Send' button on a message that's being previewed prior to insertion into the current chat. The handler should complete the flow by sending the message to the current chat.\n *\n * @param commandId - ID of the command(s) to register the handler for.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - handler.context Context for the current turn of conversation with the user.\n *\n * @param - handler.state Current state of the turn.\n *\n * @param - handler.previewActivity The activity that's being previewed by the user.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "botMessagePreviewSend(commandId: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, previewActivity: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Activity", - "canonicalReference": "botframework-schema!Activity:interface" - }, - { - "kind": "Content", - "text": ">) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 21, - "endIndex": 23 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "commandId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 10 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 20 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "botMessagePreviewSend" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!MessageExtensions#fetchTask:member(1)", - "docComment": "/**\n * Registers a handler to process the initial fetch task for an Action based message extension.\n *\n * @summary\n *\n * Handlers should response with either an initial TaskInfo object or a string containing a message to display to the user.\n *\n * @param commandId - ID of the command(s) to register the handler for.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - handler.context Context for the current turn of conversation with the user.\n *\n * @param - handler.state Current state of the turn.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "fetchTask(commandId: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TaskModuleTaskInfo", - "canonicalReference": "botframework-schema!TaskModuleTaskInfo:interface" - }, - { - "kind": "Content", - "text": " | string>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 19, - "endIndex": 21 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "commandId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 10 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 18 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "fetchTask" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!MessageExtensions#query:member(1)", - "docComment": "/**\n * Registers a handler that implements a Search based Message Extension.\n *\n * @summary\n *\n * This handler is called when the user submits a query to a Search based Message Extension. The handler should return a MessagingExtensionResult containing the results of the query.\n *\n * @param commandId - ID of the command(s) to register the handler for.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - handler.context Context for the current turn of conversation with the user.\n *\n * @param - handler.state Current state of the turn.\n *\n * @param - handler.query The query parameters that were sent by the client.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "query" - }, - { - "kind": "Content", - "text": " = " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ">(commandId: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, query: " - }, - { - "kind": "Reference", - "text": "Query", - "canonicalReference": "@microsoft/teams-ai!Query:interface" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "MessagingExtensionResult", - "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "TParams", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 27, - "endIndex": 29 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "commandId", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 16 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 17, - "endIndex": 26 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "query" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!MessageExtensions#queryLink:member(1)", - "docComment": "/**\n * Registers a handler that implements a Link Unfurling based Message Extension.\n *\n * @param commandId - ID of the command(s) to register the handler for.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - handler.context Context for the current turn of conversation with the user.\n *\n * @param - handler.state Current state of the turn.\n *\n * @param - handler.url The URL that should be unfurled.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "queryLink(commandId: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, url: string) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "MessagingExtensionResult", - "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 19, - "endIndex": 21 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "commandId", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 10 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 18 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "queryLink" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!MessageExtensions#selectItem:member(1)", - "docComment": "/**\n * Registers a handler that implements the logic to handle the tap actions for items returned by a Search based message extension.\n *\n * @summary\n *\n * The `composeExtension/selectItem` INVOKE activity does not contain any sort of command ID, so only a single select item handler can be registered. Developers will need to include a type name of some sort in the preview item they return if they need to support multiple select item handlers. @template TItem Optional. Type of the item being selected.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - handler.context Context for the current turn of conversation with the user.\n *\n * @param - handler.state Current state of the turn.\n *\n * @param - handler.item The item that was selected.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "selectItem" - }, - { - "kind": "Content", - "text": " = " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ">(handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, item: TItem) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "MessagingExtensionResult", - "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "TItem", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 15, - "endIndex": 17 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 14 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "selectItem" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!MessageExtensions#submitAction:member(1)", - "docComment": "/**\n * Registers a handler that implements the submit action for an Action based Message Extension.\n *\n * @template TData Optional. Type of data being submitted.\n *\n * @param commandId - ID of the command(s) to register the handler for.\n *\n * @param handler - Function to call when the command is received.\n *\n * @param - handler.context Context for the current turn of conversation with the user.\n *\n * @param - handler.state Current state of the turn.\n *\n * @param - handler.data The data that was submitted.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "submitAction" - }, - { - "kind": "Content", - "text": ">(commandId: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, data: TData) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "MessagingExtensionResult", - "canonicalReference": "botframework-schema!MessagingExtensionResult:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "TaskModuleTaskInfo", - "canonicalReference": "botframework-schema!TaskModuleTaskInfo:interface" - }, - { - "kind": "Content", - "text": " | string | null | undefined>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "TData", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 24, - "endIndex": 26 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "commandId", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 13 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 14, - "endIndex": 23 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "submitAction" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@microsoft/teams-ai!MessageReactionEvents:type", - "docComment": "/**\n * Message reaction event types.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type MessageReactionEvents = " - }, - { - "kind": "Content", - "text": "'reactionsAdded' | 'reactionsRemoved'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/Application.ts", - "releaseTag": "Public", - "name": "MessageReactionEvents", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } + "kind": "Content", + "text": "void" }, { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!Moderator:interface", - "docComment": "/**\n * A moderator is responsible for reviewing and approving AI prompts and plans.\n *\n * @template TState Type of the applications turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface Moderator " - } - ], - "fileUrlPath": "src/Moderator.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "Moderator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "MethodSignature", - "canonicalReference": "@microsoft/teams-ai!Moderator#reviewPlan:member(1)", - "docComment": "/**\n * Reviews a plan generated by the planner before its executed.\n *\n * @summary\n *\n * The moderator can review the plan to ensure it's appropriate for the current conversation.\n *\n * To approve a plan simply return the plan that was passed in. A new plan can be returned to redirect to a new set of actions. Typically the moderator will return a new plan with a single DO command that calls `AI.FlaggedOutputActionName` to flag the output for review.\n *\n * The moderator can pass any entities that make sense to the redirected action.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param plan - Plan generated by the planner.\n *\n * @returns The plan to execute. Either the current plan passed in for review or a new plan.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "reviewPlan(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", plan: " - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 11 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "plan", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "reviewPlan" - }, - { - "kind": "MethodSignature", - "canonicalReference": "@microsoft/teams-ai!Moderator#reviewPrompt:member(1)", - "docComment": "/**\n * Reviews an incoming utterance and generated prompt before it's sent to the planner.\n *\n * @summary\n *\n * The moderator can review the incoming utterance for things like prompt injection attacks or the leakage of sensitive information. The moderator can also review the generated prompt to ensure it's appropriate for the current conversation.\n *\n * To approve a prompt, simply return undefined. Returning a new plan bypasses the planner and redirects to a new set of actions. Typically the moderator will return a new plan with a single DO command that calls `AI.FlaggedInputActionName` to flag the input for review.\n *\n * The moderator can pass any entities that make sense to the redirected action.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param prompt - Generated prompt to be reviewed.\n *\n * @param options - Current options for the AI system.\n *\n * @returns An undefined value to approve the prompt or a new plan to redirect to if not approved.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "reviewPrompt(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", prompt: " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ", options: " - }, - { - "kind": "Reference", - "text": "ConfiguredAIOptions", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": " | undefined>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 14 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "prompt", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": false - } - ], - "name": "reviewPrompt" - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!OpenAIModerator:class", - "docComment": "/**\n * A moderator tha users OpenAI's moderation API to review prompts and plans for safety.\n *\n * @summary\n *\n * This moderation can be configure to review the input from the user, output from the model, or both. @template TState Optional. Type of the applications turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class OpenAIModerator implements " - }, - { - "kind": "Reference", - "text": "Moderator", - "canonicalReference": "@microsoft/teams-ai!Moderator:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/OpenAIModerator.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "isAbstract": false, - "name": "OpenAIModerator", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@microsoft/teams-ai!OpenAIModerator:constructor(1)", - "docComment": "/**\n * Creates a new instance of the OpenAI based moderator.\n *\n * @param options - Configuration options for the moderator.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(options: " - }, - { - "kind": "Reference", - "text": "OpenAIModeratorOptions", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!OpenAIModerator#createClient:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "protected createClient(options: " - }, - { - "kind": "Reference", - "text": "OpenAIModeratorOptions", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "OpenAIClient", - "canonicalReference": "@microsoft/teams-ai!~OpenAIClient:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": true, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createClient" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!OpenAIModerator#createModeration:member(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "protected createModeration(input: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", model?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "CreateModerationResponseResultsInner", - "canonicalReference": "@microsoft/teams-ai!~CreateModerationResponseResultsInner:interface" - }, - { - "kind": "Content", - "text": " | undefined>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "releaseTag": "Public", - "isProtected": true, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "input", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "model", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createModeration" - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!OpenAIModerator#options:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "get options(): " - }, - { - "kind": "Reference", - "text": "OpenAIModeratorOptions", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "options", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!OpenAIModerator#reviewPlan:member(1)", - "docComment": "/**\n * Reviews the SAY commands generated by the planner for safety violations.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param plan - Plan generated by the planner.\n *\n * @returns The plan to execute. Either the current plan passed in for review or a new plan.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "reviewPlan(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", plan: " - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 11 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "plan", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "reviewPlan" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!OpenAIModerator#reviewPrompt:member(1)", - "docComment": "/**\n * Reviews an incoming utterance for safety violations.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param prompt - Generated prompt to be reviewed.\n *\n * @param options - Current options for the AI system.\n *\n * @returns An undefined value to approve the prompt or a new plan to redirect to if not approved.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "reviewPrompt(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", prompt: " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ", options: " - }, - { - "kind": "Reference", - "text": "ConfiguredAIOptions", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": " | undefined>" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 14 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "prompt", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "reviewPrompt" - } - ], - "implementsTokenRanges": [ - { - "startIndex": 5, - "endIndex": 7 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions:interface", - "docComment": "/**\n * Options for the OpenAI based moderator.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface OpenAIModeratorOptions " - } - ], - "fileUrlPath": "src/OpenAIModerator.ts", - "releaseTag": "Public", - "name": "OpenAIModeratorOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#apiKey:member", - "docComment": "/**\n * OpenAI API key\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "apiKey: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "apiKey", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#apiVersion:member", - "docComment": "/**\n * Optional. Azure Content Safety API version.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "apiVersion?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "apiVersion", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#endpoint:member", - "docComment": "/**\n * Optional. OpenAI endpoint.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "endpoint?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "endpoint", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#model:member", - "docComment": "/**\n * Optional. OpenAI model to use.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "model?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "model", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#moderate:member", - "docComment": "/**\n * Which parts of the conversation to moderate.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "moderate: " - }, - { - "kind": "Content", - "text": "'input' | 'output' | 'both'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "moderate", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIModeratorOptions#organization:member", - "docComment": "/**\n * Optional. OpenAI organization.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "organization?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "organization", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlanner:class", - "docComment": "/**\n * A planner that uses OpenAI's textCompletion and chatCompletion API's to generate plans.\n *\n * @summary\n *\n * This planner can be configured to use different models for different prompts. The prompts model will determine which API is used to generate the plan. Any model that starts with 'gpt-' will use the chatCompletion API, otherwise the textCompletion API will be used. @template TState Optional. Type of the applications turn state. @template TOptions Optional. Type of the planner options.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class OpenAIPlanner implements " - }, - { - "kind": "Reference", - "text": "Planner", - "canonicalReference": "@microsoft/teams-ai!Planner:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/OpenAIPlanner.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "TOptions", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - } - ], - "isAbstract": false, - "name": "OpenAIPlanner", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlanner:constructor(1)", - "docComment": "/**\n * Creates a new instance of the OpenAI based planner.\n *\n * @param options - Options for the OpenAI based planner.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(options: " - }, - { - "kind": "Content", - "text": "TOptions" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlanner#completePrompt:member(1)", - "docComment": "/**\n * Completes a prompt without returning a plan.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param prompt - Prompt to complete.\n *\n * @param options - Configuration options for the AI system.\n *\n * @returns The response from the prompt. Can return undefined to indicate the prompt was rate limited.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "completePrompt(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", prompt: " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ", options: " - }, - { - "kind": "Reference", - "text": "ConfiguredAIOptions", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 12 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "prompt", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "completePrompt" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlanner#createClient:member(1)", - "docComment": "/**\n * @param options - @private\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "protected createClient(options: " - }, - { - "kind": "Content", - "text": "TOptions" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "OpenAIClient", - "canonicalReference": "@microsoft/teams-ai!~OpenAIClient:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": true, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "createClient" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlanner#generatePlan:member(1)", - "docComment": "/**\n * Completes a prompt and generates a plan for the AI system to execute.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param prompt - Prompt to complete.\n *\n * @param options - Configuration options for the AI system.\n *\n * @returns The plan that was generated.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "generatePlan(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", prompt: " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ", options: " - }, - { - "kind": "Reference", - "text": "ConfiguredAIOptions", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 14 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "prompt", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "generatePlan" - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlanner#options:member", - "docComment": "/**\n * Returns the configured options for the planner.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get options(): " - }, - { - "kind": "Content", - "text": "TOptions" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "options", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "implementsTokenRanges": [ - { - "startIndex": 9, - "endIndex": 11 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlannerOptions:interface", - "docComment": "/**\n * Options for the OpenAI based planner.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface OpenAIPlannerOptions " - } - ], - "fileUrlPath": "src/OpenAIPlanner.ts", - "releaseTag": "Public", - "name": "OpenAIPlannerOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlannerOptions#apiKey:member", - "docComment": "/**\n * OpenAI API key.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "apiKey: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "apiKey", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlannerOptions#defaultModel:member", - "docComment": "/**\n * The default model to use.\n *\n * @summary\n *\n * Prompts can override this model.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultModel: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "defaultModel", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlannerOptions#endpoint:member", - "docComment": "/**\n * Optional. OpenAI endpoint.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "endpoint?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "endpoint", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlannerOptions#logRequests:member", - "docComment": "/**\n * Optional. A flag indicating if the planner should log requests to the console.\n *\n * @summary\n *\n * Both the prompt text and the completion response will be logged to the console. For chatCompletion calls the outgoing messages array will also be logged. Defaults to false.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "logRequests?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "logRequests", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlannerOptions#oneSayPerTurn:member", - "docComment": "/**\n * Optional. A flag indicating if the planner should only say one thing per turn.\n *\n * @summary\n *\n * The planner will attempt to combine multiple SAY commands into a single SAY command when true. Defaults to false.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "oneSayPerTurn?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "oneSayPerTurn", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlannerOptions#organization:member", - "docComment": "/**\n * Optional. OpenAI organization.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "organization?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "organization", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!OpenAIPlannerOptions#useSystemMessage:member", - "docComment": "/**\n * Optional. A flag indicating if the planner should use the 'system' role when calling OpenAI's chatCompletion API.\n *\n * @summary\n *\n * The planner current uses the 'user' role by default as this tends to generate more reliable instruction following. Defaults to false.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "useSystemMessage?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "useSystemMessage", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!ParsedCommandResult:interface", - "docComment": "/**\n * @private\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface ParsedCommandResult " - } - ], - "fileUrlPath": "src/ResponseParser.ts", - "releaseTag": "Public", - "name": "ParsedCommandResult", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ParsedCommandResult#command:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "command?: " - }, - { - "kind": "Reference", - "text": "PredictedCommand", - "canonicalReference": "@microsoft/teams-ai!PredictedCommand:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "command", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!ParsedCommandResult#length:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "length: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "length", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!Plan:interface", - "docComment": "/**\n * A plan is a set of commands that the AI system will execute.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface Plan " - } - ], - "fileUrlPath": "src/Planner.ts", - "releaseTag": "Public", - "name": "Plan", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!Plan#commands:member", - "docComment": "/**\n * Array of predicted commands that the AI system should execute.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "commands: " - }, - { - "kind": "Reference", - "text": "PredictedCommand", - "canonicalReference": "@microsoft/teams-ai!PredictedCommand:interface" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "commands", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!Plan#type:member", - "docComment": "/**\n * Type to indicate that a plan is being returned.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "'plan'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!Planner:interface", - "docComment": "/**\n * A planner is responsible for generating a plan that the AI system will execute.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface Planner " - } - ], - "fileUrlPath": "src/Planner.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "Planner", - "preserveMemberOrder": false, - "members": [ - { - "kind": "MethodSignature", - "canonicalReference": "@microsoft/teams-ai!Planner#completePrompt:member(1)", - "docComment": "/**\n * Completes a prompt without returning a plan.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param prompt - Prompt to complete.\n *\n * @param options - Configuration options for the AI system.\n *\n * @returns The response from the prompt. Can return undefined to indicate the prompt was rate limited.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "completePrompt(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", prompt: " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ", options: " - }, - { - "kind": "Reference", - "text": "ConfiguredAIOptions", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 12 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "prompt", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": false - } - ], - "name": "completePrompt" - }, - { - "kind": "MethodSignature", - "canonicalReference": "@microsoft/teams-ai!Planner#generatePlan:member(1)", - "docComment": "/**\n * Completes a prompt and generates a plan for the AI system to execute.\n *\n * @param context - Context for the current turn of conversation.\n *\n * @param state - Application state for the current turn of conversation.\n *\n * @param prompt - Prompt to complete.\n *\n * @param options - Configuration options for the AI system.\n *\n * @returns The plan that was generated.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "generatePlan(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", prompt: " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ", options: " - }, - { - "kind": "Reference", - "text": "ConfiguredAIOptions", - "canonicalReference": "@microsoft/teams-ai!ConfiguredAIOptions:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 10, - "endIndex": 14 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "prompt", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - }, - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "isOptional": false - } - ], - "name": "generatePlan" - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!PredictedCommand:interface", - "docComment": "/**\n * A predicted command is a command that the AI system should execute.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface PredictedCommand " - } - ], - "fileUrlPath": "src/Planner.ts", - "releaseTag": "Public", - "name": "PredictedCommand", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PredictedCommand#type:member", - "docComment": "/**\n * Type of command to execute.\n *\n * @summary\n *\n * DO commands are actions that the AI system should perform. SAY commands are responses that the AI system should say.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "'DO' | 'SAY'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!PredictedDoCommand:interface", - "docComment": "/**\n * A predicted DO command is an action that the AI system should perform.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface PredictedDoCommand extends " - }, - { - "kind": "Reference", - "text": "PredictedCommand", - "canonicalReference": "@microsoft/teams-ai!PredictedCommand:interface" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/Planner.ts", - "releaseTag": "Public", - "name": "PredictedDoCommand", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PredictedDoCommand#action:member", - "docComment": "/**\n * The named action that the AI system should perform.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "action: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "action", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PredictedDoCommand#entities:member", - "docComment": "/**\n * Any entities that the AI system should use to perform the action.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "entities: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "entities", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PredictedDoCommand#type:member", - "docComment": "/**\n * Type to indicate that a DO command is being returned.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "'DO'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 2 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!PredictedDoCommandAndHandler:interface", - "docComment": "/**\n * Entities argument passed to the action handler for AI.DoCommandActionName.\n *\n * @template TState Type of the turn state.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface PredictedDoCommandAndHandler extends " - }, - { - "kind": "Reference", - "text": "PredictedDoCommand", - "canonicalReference": "@microsoft/teams-ai!PredictedDoCommand:interface" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/AI.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "PredictedDoCommandAndHandler", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PredictedDoCommandAndHandler#handler:member", - "docComment": "/**\n * The handler that should be called to execute the command.\n *\n * @param context - Current turn context.\n *\n * @param state - Current turn state.\n *\n * @param entities - Entities predicted by the model.\n *\n * @param action - Name of the command being executed.\n *\n * @returns Whether the AI system should continue executing the plan.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, entities?: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": ", action?: string) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "handler", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 2 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!PredictedSayCommand:interface", - "docComment": "/**\n * A predicted SAY command is a response that the AI system should say.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface PredictedSayCommand extends " - }, - { - "kind": "Reference", - "text": "PredictedCommand", - "canonicalReference": "@microsoft/teams-ai!PredictedCommand:interface" - }, - { - "kind": "Content", - "text": " " - } - ], - "fileUrlPath": "src/Planner.ts", - "releaseTag": "Public", - "name": "PredictedSayCommand", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PredictedSayCommand#response:member", - "docComment": "/**\n * The response that the AI system should say.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "response: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "response", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PredictedSayCommand#type:member", - "docComment": "/**\n * Type to indicate that a SAY command is being returned.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "'SAY'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 2 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!PromptManager:interface", - "docComment": "/**\n * Interface implemented by all prompt managers.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface PromptManager " - } - ], - "fileUrlPath": "src/Prompts.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "PromptManager", - "preserveMemberOrder": false, - "members": [ - { - "kind": "MethodSignature", - "canonicalReference": "@microsoft/teams-ai!PromptManager#addFunction:member(1)", - "docComment": "/**\n * Adds a custom function to the prompt manager.\n *\n * @summary\n *\n * Functions added to the prompt manager can be invoked by name from within a prompt template.\n *\n * @param name - The name of the function.\n *\n * @param handler - Promise to return on function name match.\n *\n * @param allowOverrides - Whether to allow overriding an existing function.\n *\n * @returns The prompt manager for chaining.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "addFunction(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ", allowOverrides?: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 8 - }, - "isOptional": false - }, - { - "parameterName": "allowOverrides", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - }, - "isOptional": true - } - ], - "name": "addFunction" - }, - { - "kind": "MethodSignature", - "canonicalReference": "@microsoft/teams-ai!PromptManager#addPromptTemplate:member(1)", - "docComment": "/**\n * Adds a prompt template to the prompt manager.\n *\n * @param name - Name of the prompt template.\n *\n * @param template - Prompt template to add.\n *\n * @returns The prompt manager for chaining.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "addPromptTemplate(name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ", template: " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "this" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "template", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - } - ], - "name": "addPromptTemplate" - }, - { - "kind": "MethodSignature", - "canonicalReference": "@microsoft/teams-ai!PromptManager#invokeFunction:member(1)", - "docComment": "/**\n * Invokes a function by name.\n *\n * @param context - Current application turn context.\n *\n * @param state - Current turn state.\n *\n * @param name - Name of the function to invoke.\n *\n * @returns The result returned by the function for insertion into a prompt.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "invokeFunction(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", name: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 7, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "name", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "isOptional": false - } - ], - "name": "invokeFunction" - }, - { - "kind": "MethodSignature", - "canonicalReference": "@microsoft/teams-ai!PromptManager#renderPrompt:member(1)", - "docComment": "/**\n * Renders a prompt template by name.\n *\n * @param context - Current application turn context.\n *\n * @param state - Current turn state.\n *\n * @param nameOrTemplate - Name of the prompt template to render or a prompt template to render.\n *\n * @returns The rendered prompt template.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "renderPrompt(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": ", nameOrTemplate: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "PromptTemplate", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 12 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": false - }, - { - "parameterName": "nameOrTemplate", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "renderPrompt" - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@microsoft/teams-ai!PromptSelector:type", - "docComment": "/**\n * A function that can be used to select a prompt to use for the current turn.\n *\n * @template TState Type of the turn state.\n *\n * @param context - The current turn context.\n *\n * @param state - The current turn state.\n *\n * @returns A string or prompt template to use for the current turn.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type PromptSelector = " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/AI.ts", - "releaseTag": "Public", - "name": "PromptSelector", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 10 - } + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [], + "isOptional": false, + "isAbstract": false, + "name": "delete" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#hasChanged:member", + "docComment": "/**\n * Gets a value indicating whether the state scope has changed since it was last loaded.\n *\n * @returns {boolean} A value indicating whether the state scope has changed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get hasChanged(): " }, { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate:interface", - "docComment": "/**\n * Prompt template cached by the prompt manager.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface PromptTemplate " - } - ], - "fileUrlPath": "src/Prompts.ts", - "releaseTag": "Public", - "name": "PromptTemplate", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate#config:member", - "docComment": "/**\n * Configuration settings for the prompt template.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "config: " - }, - { - "kind": "Reference", - "text": "PromptTemplateConfig", - "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "config", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PromptTemplate#text:member", - "docComment": "/**\n * Text of the prompt template.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "text: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "text", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig:interface", - "docComment": "/**\n * Serialized prompt template configuration.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface PromptTemplateConfig " - } - ], - "fileUrlPath": "src/Prompts.ts", - "releaseTag": "Public", - "name": "PromptTemplateConfig", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig#completion:member", - "docComment": "/**\n * Completion settings for the prompt.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "completion: " - }, - { - "kind": "Reference", - "text": "CompletionConfig", - "canonicalReference": "@microsoft/teams-ai!CompletionConfig:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "completion", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig#default_backends:member", - "docComment": "/**\n * Optional. Array of backends (models) to use for the prompt.\n *\n * @summary\n *\n * Passing the name of a model to use here will override the default model used by a planner.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "default_backends?: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "default_backends", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig#description:member", - "docComment": "/**\n * Description of the prompts purpose.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "description: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "description", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig#schema:member", - "docComment": "/**\n * The schema version of the prompt template. Should always be '1'.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "schema: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "schema", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!PromptTemplateConfig#type:member", - "docComment": "/**\n * Type of prompt template. Should always be 'completion'.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "'completion'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!Query:interface", - "docComment": "/**\n * Query arguments for a search-based message extension.\n *\n * @template TParams Type of the query parameters.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface Query" - }, - { - "kind": "Content", - "text": "> " - } - ], - "fileUrlPath": "src/Application.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TParams", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "Query", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!Query#count:member", - "docComment": "/**\n * Number of items to return in the result set.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "count: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "count", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!Query#parameters:member", - "docComment": "/**\n * Query parameters.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "parameters: " - }, - { - "kind": "Content", - "text": "TParams" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "parameters", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!Query#skip:member", - "docComment": "/**\n * Number of items to skip in the result set.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "skip: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": false, - "releaseTag": "Public", - "name": "skip", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!ResponseParser:class", - "docComment": "/**\n * Utility class to parse responses returned from LLM's.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class ResponseParser " - } - ], - "fileUrlPath": "src/ResponseParser.ts", - "releaseTag": "Public", - "isAbstract": false, - "name": "ResponseParser", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ResponseParser.parseAdaptiveCard:member(1)", - "docComment": "/**\n * Attempts to find an Adaptive Card in a response.\n *\n * @param text - Optional. Text to parse.\n *\n * @returns The found Adaptive Card or undefined if no card could be detected.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static parseAdaptiveCard(text?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "text", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "parseAdaptiveCard" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ResponseParser.parseDoCommand:member(1)", - "docComment": "/**\n * @param tokens - @private\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static parseDoCommand(tokens: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "ParsedCommandResult", - "canonicalReference": "@microsoft/teams-ai!ParsedCommandResult:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "tokens", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "parseDoCommand" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ResponseParser.parseJSON:member(1)", - "docComment": "/**\n * Attempts to find a JSON object with-in a response.\n *\n * @template T Optional. Type of object to return.\n *\n * @param text - Optional. Text to parse.\n *\n * @returns The parsed object or undefined if no object could be detected.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static parseJSON" - }, - { - "kind": "Content", - "text": ">(text?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "text", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "parseJSON" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ResponseParser.parseResponse:member(1)", - "docComment": "/**\n * Parses a response and returns a plan.\n *\n * @summary\n *\n * If a plan object can be detected in the response it will be returned. Otherwise a plan with a single SAY command containing the response will be returned.\n *\n * @param text - Optional. Text to parse.\n *\n * @returns The parsed plan.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static parseResponse(text?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Plan", - "canonicalReference": "@microsoft/teams-ai!Plan:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "text", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "parseResponse" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ResponseParser.parseSayCommand:member(1)", - "docComment": "/**\n * @param tokens - @private\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static parseSayCommand(tokens: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "ParsedCommandResult", - "canonicalReference": "@microsoft/teams-ai!ParsedCommandResult:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "tokens", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "parseSayCommand" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!ResponseParser.tokenizeText:member(1)", - "docComment": "/**\n * @param text - @private\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "static tokenizeText(text?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": true, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "text", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "tokenizeText" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@microsoft/teams-ai!RouteHandler:type", - "docComment": "/**\n * Function for handling an incoming request.\n *\n * @template TState Type of the turn state.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param state - Current turn state.\n *\n * @returns A promise that resolves when the handler completes its processing.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type RouteHandler = " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/Application.ts", - "releaseTag": "Public", - "name": "RouteHandler", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 3, - "endIndex": 8 - } + "kind": "Content", + "text": "boolean" }, { - "kind": "TypeAlias", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type", - "docComment": "/**\n * Function for selecting whether a route handler should be triggered.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @returns A promise that resolves with a boolean indicating whether the route handler should be triggered.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type RouteSelector = " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ") => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/Application.ts", - "releaseTag": "Public", - "name": "RouteSelector", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "hasChanged", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#isDeleted:member", + "docComment": "/**\n * Gets a value indicating whether the state scope has been deleted.\n *\n * @returns {boolean} A value indicating whether the state scope has been deleted.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get isDeleted(): " }, { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!TaskModules:class", - "docComment": "/**\n * TaskModules class to enable fluent style registration of handlers related to Task Modules.\n *\n * @template TState Type of the turn state object being persisted.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class TaskModules " - } - ], - "fileUrlPath": "src/TaskModules.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "isAbstract": false, - "name": "TaskModules", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@microsoft/teams-ai!TaskModules:constructor(1)", - "docComment": "/**\n * Creates a new instance of the TaskModules class.\n *\n * @param app - Top level application class to register handlers with.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(app: " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "app", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!TaskModules#fetch:member(1)", - "docComment": "/**\n * Registers a handler to process the initial fetch of the task module.\n *\n * @summary\n *\n * Handlers should respond with either an initial TaskInfo object or a string containing a message to display to the user. @template TData Optional. Type of the data object being passed to the handler.\n *\n * @param verb - Name of the verb(s) to register the handler for.\n *\n * @param handler - Function to call when the handler is triggered.\n *\n * @param - handler.context Context for the current turn of conversation with the user.\n *\n * @param - handler.state Current state of the turn.\n *\n * @param - handler.data Data object passed to the handler.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "fetch" - }, - { - "kind": "Content", - "text": " = " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ">(verb: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, data: TData) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TaskModuleTaskInfo", - "canonicalReference": "botframework-schema!TaskModuleTaskInfo:interface" - }, - { - "kind": "Content", - "text": " | string>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "TData", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 25, - "endIndex": 27 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "verb", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 16 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 17, - "endIndex": 24 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "fetch" - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!TaskModules#submit:member(1)", - "docComment": "/**\n * Registers a handler to process the submission of a task module.\n *\n * @summary\n *\n * Handlers should respond with another TaskInfo object, message string, or `null` to indicate the task is completed. @template TData Optional. Type of the data object being passed to the handler.\n *\n * @param verb - Name of the verb(s) to register the handler for.\n *\n * @param handler - Function to call when the handler is triggered.\n *\n * @param - handler.context Context for the current turn of conversation with the user.\n *\n * @param - handler.state Current state of the turn.\n *\n * @param - handler.data Data object passed to the handler.\n *\n * @returns The application for chaining purposes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "submit" - }, - { - "kind": "Content", - "text": " = " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ">(verb: " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": " | (string | " - }, - { - "kind": "Reference", - "text": "RegExp", - "canonicalReference": "!RegExp:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RouteSelector", - "canonicalReference": "@microsoft/teams-ai!RouteSelector:type" - }, - { - "kind": "Content", - "text": ")[]" - }, - { - "kind": "Content", - "text": ", handler: " - }, - { - "kind": "Content", - "text": "(context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: TState, data: TData) => " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TaskModuleTaskInfo", - "canonicalReference": "botframework-schema!TaskModuleTaskInfo:interface" - }, - { - "kind": "Content", - "text": " | string | null | undefined>" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Application", - "canonicalReference": "@microsoft/teams-ai!Application:class" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "typeParameters": [ - { - "typeParameterName": "TData", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - } - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 25, - "endIndex": 27 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "verb", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 16 - }, - "isOptional": false - }, - { - "parameterName": "handler", - "parameterTypeTokenRange": { - "startIndex": 17, - "endIndex": 24 - }, - "isOptional": false - } - ], - "isOptional": false, - "isAbstract": false, - "name": "submit" - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!TaskModulesOptions:interface", - "docComment": "/**\n * Options for TaskModules class.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TaskModulesOptions " - } - ], - "fileUrlPath": "src/TaskModules.ts", - "releaseTag": "Public", - "name": "TaskModulesOptions", - "preserveMemberOrder": false, - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@microsoft/teams-ai!TaskModulesOptions#taskDataFilter:member", - "docComment": "/**\n * Data field to use to identify the verb of the handler to trigger.\n *\n * @summary\n *\n * When a task module is triggered, the field name specified here will be used to determine the name of the verb for the handler to route the request to.\n *\n * Defaults to a value of 'verb'.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "taskDataFilter?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "isOptional": true, - "releaseTag": "Public", - "name": "taskDataFilter", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@microsoft/teams-ai!TurnEvents:type", - "docComment": "/**\n * Turn event types.\n *\n * @summary\n *\n * The `beforeTurn` event is triggered before the turn is processed. This allows for the turn state to be modified before the turn is processed. Returning false from the event handler will prevent the turn from being processed.\n *\n * The `afterTurn` event is triggered after the turn is processed. This allows for the turn state to be modified or inspected after the turn is processed. Returning false from the event handler will prevent the turn state from being saved.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export type TurnEvents = " - }, - { - "kind": "Content", - "text": "'beforeTurn' | 'afterTurn'" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "src/Application.ts", - "releaseTag": "Public", - "name": "TurnEvents", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "isDeleted", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#replace:member(1)", + "docComment": "/**\n * Replaces the state scope with a new value. @template TValue\n *\n * @param value - New value to replace the state scope with.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "replace(value?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "replace" + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#storageKey:member", + "docComment": "/**\n * Gets the storage key used to persist the state scope.\n *\n * @returns {string | undefined} The storage key used to persist the state scope.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get storageKey(): " + }, + { + "kind": "Content", + "text": "string | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "storageKey", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + }, + { + "kind": "Property", + "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#value:member", + "docComment": "/**\n * Gets the value of the state scope.\n *\n * @returns {Record} value of the state scope.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "get value(): " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": true, + "isOptional": false, + "releaseTag": "Public", + "name": "value", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "isStatic": false, + "isProtected": false, + "isAbstract": false + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!UserInputMessage:class", + "docComment": "/**\n * A section capable of rendering user input text and images as a user message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class UserInputMessage extends " + }, + { + "kind": "Reference", + "text": "PromptSectionBase", + "canonicalReference": "@microsoft/teams-ai!PromptSectionBase:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/UserInputMessage.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "UserInputMessage", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!UserInputMessage:constructor(1)", + "docComment": "/**\n * Creates a new 'UserInputMessage' instance.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `auto`.\n *\n * @param inputVariable - Optional. Name of the variable containing the user input text. Defaults to `input`.\n *\n * @param filesVariable - Optional. Name of the variable containing the user input files. Defaults to `inputFiles`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", inputVariable?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", filesVariable?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + }, + { + "parameterName": "inputVariable", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "filesVariable", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!UserInputMessage#renderAsMessages:member(1)", + "docComment": "/**\n * @private\n *\n * @param context - Turn context for the message to be rendered.\n *\n * @param memory - Memory in storage.\n *\n * @param functions - Prompt functions.\n *\n * @param tokenizer - Tokenizer.\n *\n * @param maxTokens - Max tokens to be used for rendering.\n *\n * @returns {Promise[]>>} Rendered prompt section.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "renderAsMessages(context: " + }, + { + "kind": "Reference", + "text": "TurnContext", + "canonicalReference": "botbuilder-core!TurnContext:class" + }, + { + "kind": "Content", + "text": ", memory: " + }, + { + "kind": "Reference", + "text": "Memory", + "canonicalReference": "@microsoft/teams-ai!Memory:interface" + }, + { + "kind": "Content", + "text": ", functions: " + }, + { + "kind": "Reference", + "text": "PromptFunctions", + "canonicalReference": "@microsoft/teams-ai!PromptFunctions:interface" + }, + { + "kind": "Content", + "text": ", tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", maxTokens: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "RenderedPromptSection", + "canonicalReference": "@microsoft/teams-ai!RenderedPromptSection:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Message", + "canonicalReference": "@microsoft/teams-ai!Message:interface" + }, + { + "kind": "Content", + "text": "[]>>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 17 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "context", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "memory", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "functions", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": false + }, + { + "parameterName": "maxTokens", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "isOptional": false + } + ], + "isOptional": false, + "isAbstract": false, + "name": "renderAsMessages" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!UserMessage:class", + "docComment": "/**\n * A user message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class UserMessage extends " + }, + { + "kind": "Reference", + "text": "TemplateSection", + "canonicalReference": "@microsoft/teams-ai!TemplateSection:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "fileUrlPath": "src/prompts/UserMessage.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "UserMessage", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Constructor", + "canonicalReference": "@microsoft/teams-ai!UserMessage:constructor(1)", + "docComment": "/**\n * Creates a new 'UserMessage' instance.\n *\n * @param template - Template to use for this section.\n *\n * @param tokens - Optional. Sizing strategy for this section. Defaults to `auto`.\n *\n * @param userPrefix - Optional. Prefix to use for user messages when rendering as text. Defaults to `user: `.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(template: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", tokens?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", userPrefix?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "template", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "tokens", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + }, + { + "parameterName": "userPrefix", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ] + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "@microsoft/teams-ai!Utilities:class", + "docComment": "/**\n * Utility functions for manipulating .\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Utilities " + } + ], + "fileUrlPath": "src/Utilities.ts", + "releaseTag": "Public", + "isAbstract": false, + "name": "Utilities", + "preserveMemberOrder": false, + "members": [ + { + "kind": "Method", + "canonicalReference": "@microsoft/teams-ai!Utilities.toString:member(1)", + "docComment": "/**\n * Converts a value to a string.\n *\n * @remarks\n *\n * Dates are converted to ISO strings and Objects are converted to JSON or YAML, whichever is shorter.\n *\n * @param tokenizer - Tokenizer to use for encoding.\n *\n * @param value - Value to convert.\n *\n * @param asJSON - Optional. If true objects will always be converted to JSON instead of YAML. Defaults to false.\n *\n * @returns Converted value.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "static toString(tokenizer: " + }, + { + "kind": "Reference", + "text": "Tokenizer", + "canonicalReference": "@microsoft/teams-ai!Tokenizer:interface" + }, + { + "kind": "Content", + "text": ", value: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ", asJSON?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "releaseTag": "Public", + "isProtected": false, + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "tokenizer", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "value", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "asJSON", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ], + "isOptional": false, + "isAbstract": false, + "name": "toString" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!ValidatedChatCompletionAction:interface", + "docComment": "/**\n * A validated action call.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ValidatedChatCompletionAction " + } + ], + "fileUrlPath": "src/validators/ActionResponseValidator.ts", + "releaseTag": "Public", + "name": "ValidatedChatCompletionAction", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ValidatedChatCompletionAction#name:member", + "docComment": "/**\n * Name of the action to call.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!ValidatedChatCompletionAction#parameters:member", + "docComment": "/**\n * Arguments to pass to the action.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "parameters: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "parameters", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@microsoft/teams-ai!Validation:interface", + "docComment": "/**\n * Response returned by a `PromptResponseValidator`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Validation " + } + ], + "fileUrlPath": "src/validators/PromptResponseValidator.ts", + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "TValue", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "Validation", + "preserveMemberOrder": false, + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Validation#feedback:member", + "docComment": "/**\n * Optional. Repair instructions to send to the model.\n *\n * @remarks\n *\n * Should be set if the validation fails.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "feedback?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "feedback", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Validation#type:member", + "docComment": "/**\n * Type of the validation object.\n *\n * @remarks\n *\n * This is used for type checking.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "'Validation'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Validation#valid:member", + "docComment": "/**\n * Whether the validation is valid.\n *\n * @remarks\n *\n * If this is `false` the `feedback` property will be set, otherwise the `value` property MAY be set.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "valid: " + }, + { + "kind": "Content", + "text": "boolean" }, { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!TurnState:interface", - "docComment": "/**\n * Base interface defining a collection of turn state scopes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TurnState " - } - ], - "fileUrlPath": "src/TurnState.ts", - "releaseTag": "Public", - "name": "TurnState", - "preserveMemberOrder": false, - "members": [ - { - "kind": "IndexSignature", - "canonicalReference": "@microsoft/teams-ai!TurnState:index(1)", - "docComment": "/**\n * A named state scope.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "[key: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": "]: " - }, - { - "kind": "Reference", - "text": "TurnStateEntry", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry:class" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "key", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ] - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry:class", - "docComment": "/**\n * Accessor class for managing an individual state scope.\n *\n * @template TValue Optional. Strongly typed value of the state scope.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class TurnStateEntry" - }, - { - "kind": "Content", - "text": " = " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "> " - } - ], - "fileUrlPath": "src/TurnState.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TValue", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "defaultTypeTokenRange": { - "startIndex": 4, - "endIndex": 6 - } - } - ], - "isAbstract": false, - "name": "TurnStateEntry", - "preserveMemberOrder": false, - "members": [ - { - "kind": "Constructor", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry:constructor(1)", - "docComment": "/**\n * Creates a new instance of the `TurnStateEntry` class.\n *\n * @param value - Optional. Value to initialize the state scope with. The default is an {} object.\n *\n * @param storageKey - Optional. Storage key to use when persisting the state scope.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(value?: " - }, - { - "kind": "Content", - "text": "TValue" - }, - { - "kind": "Content", - "text": ", storageKey?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - }, - { - "parameterName": "storageKey", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "isOptional": true - } - ] - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#delete:member(1)", - "docComment": "/**\n * Clears the state scope.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "delete(): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [], - "isOptional": false, - "isAbstract": false, - "name": "delete" - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#hasChanged:member", - "docComment": "/**\n * Gets a value indicating whether the state scope has changed since it was last loaded.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get hasChanged(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "hasChanged", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#isDeleted:member", - "docComment": "/**\n * Gets a value indicating whether the state scope has been deleted.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get isDeleted(): " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "isDeleted", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Method", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#replace:member(1)", - "docComment": "/**\n * Replaces the state scope with a new value.\n *\n * @param value - New value to replace the state scope with.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "replace(value?: " - }, - { - "kind": "Content", - "text": "TValue" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "void" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "isProtected": false, - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "value", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": true - } - ], - "isOptional": false, - "isAbstract": false, - "name": "replace" - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#storageKey:member", - "docComment": "/**\n * Gets the storage key used to persist the state scope.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get storageKey(): " - }, - { - "kind": "Content", - "text": "string | undefined" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "storageKey", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - }, - { - "kind": "Property", - "canonicalReference": "@microsoft/teams-ai!TurnStateEntry#value:member", - "docComment": "/**\n * Gets the value of the state scope.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "get value(): " - }, - { - "kind": "Content", - "text": "TValue" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isReadonly": true, - "isOptional": false, - "releaseTag": "Public", - "name": "value", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false, - "isProtected": false, - "isAbstract": false - } - ], - "implementsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@microsoft/teams-ai!TurnStateManager:interface", - "docComment": "/**\n * Interface implemented by classes responsible for loading and saving an applications turn state.\n *\n * @template TState Type of the state object being persisted.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface TurnStateManager " - } - ], - "fileUrlPath": "src/TurnState.ts", - "releaseTag": "Public", - "typeParameters": [ - { - "typeParameterName": "TState", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "TurnStateManager", - "preserveMemberOrder": false, - "members": [ - { - "kind": "MethodSignature", - "canonicalReference": "@microsoft/teams-ai!TurnStateManager#loadState:member(1)", - "docComment": "/**\n * Loads all of the state scopes for the current turn.\n *\n * @param storage - Storage provider to load state scopes from.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @returns The loaded state scopes.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "loadState(storage: " - }, - { - "kind": "Reference", - "text": "Storage", - "canonicalReference": "botbuilder-core!Storage:interface" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ", context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 8 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "storage", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - } - ], - "name": "loadState" - }, - { - "kind": "MethodSignature", - "canonicalReference": "@microsoft/teams-ai!TurnStateManager#saveState:member(1)", - "docComment": "/**\n * Saves all of the state scopes for the current turn.\n *\n * @param storage - Storage provider to save state scopes to.\n *\n * @param context - Context for the current turn of conversation with the user.\n *\n * @param state - State scopes to save.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "saveState(storage: " - }, - { - "kind": "Reference", - "text": "Storage", - "canonicalReference": "botbuilder-core!Storage:interface" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ", context: " - }, - { - "kind": "Reference", - "text": "TurnContext", - "canonicalReference": "botbuilder-core!TurnContext:class" - }, - { - "kind": "Content", - "text": ", state: " - }, - { - "kind": "Content", - "text": "TState" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "storage", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "context", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - }, - { - "parameterName": "state", - "parameterTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "saveState" - } - ], - "extendsTokenRanges": [] - } - ] + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": false, + "releaseTag": "Public", + "name": "valid", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@microsoft/teams-ai!Validation#value:member", + "docComment": "/**\n * Optional. Replacement value to use for the response.\n *\n * @remarks\n *\n * Can be set if the validation succeeds. If set, the value will replace the responses `message.content` property.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "value?: " + }, + { + "kind": "Content", + "text": "TValue" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isReadonly": false, + "isOptional": true, + "releaseTag": "Public", + "name": "value", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] } - ] + ] + } + ] } diff --git a/js/packages/teams-ai/package.json b/js/packages/teams-ai/package.json index 74ada7a8b..a56b6aa02 100644 --- a/js/packages/teams-ai/package.json +++ b/js/packages/teams-ai/package.json @@ -53,15 +53,14 @@ }, "scripts": { "build": "tsc -b", - "build-docs": "typedoc --theme markdown --entryPoint teams-ai --excludePrivate --includeDeclarations --ignoreCompilerErrors --module amd --out ..\\..\\doc\\botbuilder-ai .\\lib\\index.d.ts --hideGenerator --name \"Bot Builder SDK - AI\" --readme none", - "build:rollup": "yarn clean && yarn build && api-extractor run --verbose --local", + "build:rollup": "yarn clean && yarn build && npx api-extractor run --verbose --local", "clean": "rimraf _ts3.4 lib tsconfig.tsbuildinfo node_modules", "depcheck": "depcheck --config ../../.depcheckrc", "lint": "eslint **/src/**/*.{j,t}s{,x} --fix --no-error-on-unmatched-pattern", "test": "npx mocha -r ts-node/register src/**/*.spec.ts", "test:debug": "ts-mocha src/**/*.spec.ts --inspect-brk", "test:coverage": "nyc --reporter=html --reporter=text --reporter=text-summary npm test", - "test:compat": "api-extractor run --verbose" + "test:compat": "npx api-extractor run --verbose" }, "files": [ "_ts3.4", diff --git a/js/packages/teams-ai/src/AI.ts b/js/packages/teams-ai/src/AI.ts index e5ffd7545..c0dd40fcd 100644 --- a/js/packages/teams-ai/src/AI.ts +++ b/js/packages/teams-ai/src/AI.ts @@ -7,6 +7,7 @@ */ import { Channels, TurnContext } from 'botbuilder'; + import { DefaultModerator } from './moderators'; import { Moderator } from './moderators/Moderator'; import { PredictedDoCommand, PredictedSayCommand, Planner, Plan } from './planners'; @@ -313,14 +314,14 @@ export class AI { * Returns the moderator being used by the AI system. * @remarks * The default moderator simply allows all messages and plans through without intercepting them. - * @returns The AI's moderator + * @returns {Moderator} The AI's moderator */ public get moderator(): Moderator { return this._options.moderator; } /** - * @returns Returns the planner being used by the AI system. + * @returns {Planner} Returns the planner being used by the AI system. */ public get planner(): Planner { return this._options.planner; @@ -342,9 +343,13 @@ export class AI { * handler for them. The names of the built-in actions are available as static properties on * the AI class. * @template TParameters Optional. The type of parameters that the action handler expects. - * @param name Unique name of the action. - * @param handler Function to call when the action is triggered. - * @returns The AI system instance for chaining purposes. + * @param {string | string[]} name Unique name of the action. + * @callback handler + * @param {Function} handler The code to execute when the action's name is triggered. + * @param {TurnContext} handler.context The current turn context for the handler callback. + * @param {TState} handler.state The current turn state for the handler callback. + * @param {TParameters} handler.parameters Optional. Entities to pass to the action. + * @returns {this} The AI system instance for chaining purposes. */ public action | undefined>( name: string | string[], @@ -374,9 +379,12 @@ export class AI { * @remarks * Default handlers can be replaced by calling the action() method with the same name. * @template TParameters Optional. The type of parameters that the action handler expects. - * @param name Unique name of the action. - * @param handler Function to call when the action is triggered. - * @returns The AI system instance for chaining purposes. + * @param {string | string[]} name Unique name of the action. + * @callback handler + * @param {Function} handler The code to execute when the action's name is triggered. + * @param {TurnContext} handler.context The current turn context for the handler callback. + * @param {TState} handler.state The current turn state for the handler callback. + * @returns {this} The AI system instance for chaining purposes. */ public defaultAction | undefined>( name: string | string[], @@ -392,11 +400,11 @@ export class AI { /** * Manually executes a named action. * @template TParameters Optional. Type of entities expected to be passed to the action. - * @param context Current turn context. - * @param state Current turn state. - * @param action Name of the action to execute. - * @param parameters Optional. Entities to pass to the action. - * @returns True if the action thinks other actions should be executed. + * @param {TurnContext} context Current turn context. + * @param {TState} state Current turn state. + * @param {string} action Name of the action to execute. + * @param {TParameters} parameters Optional. Entities to pass to the action. + * @returns {Promise} The result of the action. */ public async doAction>( context: TurnContext, @@ -414,8 +422,8 @@ export class AI { /** * Checks to see if the AI system has a handler for a given action. - * @param action Name of the action to check. - * @returns True if the AI system has a handler for the given action. + * @param {string} action Name of the action to check. + * @returns {boolean} True if the AI system has a handler for the given action. */ public hasAction(action: string): boolean { return this._actions.has(action); @@ -427,11 +435,11 @@ export class AI { * The moderator is called to review the input and output of the plan. If the moderator flags * the input or output then the appropriate action is called. If the moderator allows the input * and output then the plan is executed. - * @param context Current turn context. - * @param state Current turn state. - * @param start_time Optional. Time the AI system started running - * @param step_count Optional. Number of steps that have been executed. - * @returns True if the plan was completely executed, otherwise false. + * @param {TurnContext} context Current turn context. + * @param {TState} state Current turn state. + * @param {number} start_time Optional. Time the AI system started running + * @param {number} step_count Optional. Number of steps that have been executed. + * @returns {Promise} True if the plan was completely executed, otherwise false. */ public async run(context: TurnContext, state: TState, start_time?: number, step_count?: number): Promise { // Initialize start time and action count diff --git a/js/packages/teams-ai/src/AdaptiveCards.ts b/js/packages/teams-ai/src/AdaptiveCards.ts index 91fa79c6d..3bd4dc689 100644 --- a/js/packages/teams-ai/src/AdaptiveCards.ts +++ b/js/packages/teams-ai/src/AdaptiveCards.ts @@ -226,9 +226,13 @@ export class AdaptiveCards { /** * Adds a route to the application for handling the `Data.Query` request for an `Input.ChoiceSet`. - * @param dataset The named dataset(s) to be handled. - * @param handler The code to execute when the query is triggered. - * @returns The application for chaining purposes. + * @param {string | RegExp | RouteSelector | (string | RegExp | RouteSelector)[]} dataset The named dataset(s) to be handled. + * @callback handler + * @param {Function} handler The code to execute when the query is triggered. + * @param {TurnContext} handler.context The current turn context for the handler callback. + * @param {TState} handler.state The current turn state for the handler callback. + * @param {Query} handler.query The query parameters for the handler callback. + * @returns {this} The application for chaining purposes. */ public search( dataset: string | RegExp | RouteSelector | (string | RegExp | RouteSelector)[], diff --git a/js/packages/teams-ai/src/Application.spec.ts b/js/packages/teams-ai/src/Application.spec.ts index 6542a5342..7bef857d4 100644 --- a/js/packages/teams-ai/src/Application.spec.ts +++ b/js/packages/teams-ai/src/Application.spec.ts @@ -17,10 +17,10 @@ import { import { Application, ConversationUpdateEvents, MessageReactionEvents, TeamsMessageEvents } from './Application'; import { AdaptiveCardsOptions } from './AdaptiveCards'; import { AIOptions } from './AI'; +import { TestPlanner } from './internals/testing/TestPlanner'; +import { createTestConversationUpdate, createTestInvoke } from './internals/testing/TestUtilities'; import { TaskModulesOptions } from './TaskModules'; import { TurnState } from './TurnState'; -import { createTestConversationUpdate, createTestInvoke } from './internals'; -import { TestPlanner } from './planners/TestPlanner'; import { TeamsAdapter } from './TeamsAdapter'; class MockUserTokenClient { diff --git a/js/packages/teams-ai/src/ApplicationBuilder.spec.ts b/js/packages/teams-ai/src/ApplicationBuilder.spec.ts index 8995f3a4d..b34a4ce90 100644 --- a/js/packages/teams-ai/src/ApplicationBuilder.spec.ts +++ b/js/packages/teams-ai/src/ApplicationBuilder.spec.ts @@ -4,10 +4,10 @@ import { MemoryStorage } from 'botbuilder'; import { ApplicationBuilder } from './ApplicationBuilder'; import { AdaptiveCardsOptions } from './AdaptiveCards'; import { AIOptions } from './AI'; -import { TurnState } from './TurnState'; -import { TestPlanner } from './planners'; +import { TestPlanner } from './internals/testing/TestPlanner'; import { TaskModulesOptions } from './TaskModules'; import { TeamsAdapter } from './TeamsAdapter'; +import { TurnState } from './TurnState'; describe('ApplicationBuilder', () => { const botAppId = 'testBot'; diff --git a/js/packages/teams-ai/src/MemoryFork.spec.ts b/js/packages/teams-ai/src/MemoryFork.spec.ts index 9a221a227..f81623523 100644 --- a/js/packages/teams-ai/src/MemoryFork.spec.ts +++ b/js/packages/teams-ai/src/MemoryFork.spec.ts @@ -1,6 +1,7 @@ import assert from 'assert'; + +import { TestMemoryFork } from './internals/testing/TestMemoryFork'; import { MemoryFork } from './MemoryFork'; -import { TestMemoryFork } from './TestMemoryFork'; describe('MemoryFork', () => { let mockMemory: MemoryFork; diff --git a/js/packages/teams-ai/src/MemoryFork.ts b/js/packages/teams-ai/src/MemoryFork.ts index b75464494..c8ebaef63 100644 --- a/js/packages/teams-ai/src/MemoryFork.ts +++ b/js/packages/teams-ai/src/MemoryFork.ts @@ -20,7 +20,6 @@ export interface Memory { /** * Deletes a value from the memory. * @param path Path to the value to delete in the form of `[scope].property`. If scope is omitted, the value is deleted from the temporary scope. - * @returns True if the value was deleted, false otherwise. * @throws Error if the path is invalid. */ deleteValue(path: string): void; @@ -34,6 +33,7 @@ export interface Memory { /** * Retrieves a value from the memory. + * @template TValue Type of the value to retrieve. * @param path Path to the value to retrieve in the form of `[scope].property`. If scope is omitted, the value is retrieved from the temporary scope. * @returns The value or undefined if not found. */ @@ -59,7 +59,7 @@ export class MemoryFork implements Memory { /** * Creates a new `MemoryFork` instance. - * @param memory Memory to fork. + * @param {Memory} memory Memory to fork. */ public constructor(memory: Memory) { this._memory = memory; @@ -69,7 +69,7 @@ export class MemoryFork implements Memory { * Deletes a value from the memory. * @remarks * Only forked values will be deleted. - * @param path Path to the value to delete in the form of `[scope].property`. If scope is omitted, the value is deleted from the temporary scope. + * @param {string} path Path to the value to delete in the form of `[scope].property`. If scope is omitted, the value is deleted from the temporary scope. */ public deleteValue(path: string): void { const { scope, name } = this.getScopeAndName(path); @@ -82,8 +82,8 @@ export class MemoryFork implements Memory { * Checks if a value exists in the memory. * @remarks * The forked memory is checked first, then the original memory. - * @param path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. - * @returns True if the value exists, false otherwise. + * @param {string} path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. + * @returns {boolean} True if the value exists, false otherwise. */ public hasValue(path: string): boolean { const { scope, name } = this.getScopeAndName(path); @@ -96,10 +96,11 @@ export class MemoryFork implements Memory { /** * Retrieves a value from the memory. + * @template TValue Type of the value to retrieve. * @remarks * The forked memory is checked first, then the original memory. - * @param path Path to the value to retrieve in the form of `[scope].property`. If scope is omitted, the value is retrieved from the temporary scope. - * @returns The value or undefined if not found. + * @param {string} path Path to the value to retrieve in the form of `[scope].property`. If scope is omitted, the value is retrieved from the temporary scope. + * @returns {TValue | undefined} The value or undefined if not found. */ public getValue(path: string): TValue { const { scope, name } = this.getScopeAndName(path); @@ -116,8 +117,8 @@ export class MemoryFork implements Memory { * Assigns a value to the memory. * @remarks * The value is assigned to the forked memory. - * @param path Path to the value to assign in the form of `[scope].property`. If scope is omitted, the value is assigned to the temporary scope. - * @param value Value to assign. + * @param {string} path Path to the value to assign in the form of `[scope].property`. If scope is omitted, the value is assigned to the temporary scope. + * @param {unknown} value Value to assign. */ public setValue(path: string, value: unknown): void { const { scope, name } = this.getScopeAndName(path); @@ -129,8 +130,9 @@ export class MemoryFork implements Memory { } /** - * @param path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. * @private + * @param {string} path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. + * @returns {Record} Scope and name. */ private getScopeAndName(path: string): { scope: string; name: string } { // Get variable scope and name diff --git a/js/packages/teams-ai/src/MessageExtensions.spec.ts b/js/packages/teams-ai/src/MessageExtensions.spec.ts index 33b338e3e..0215ce711 100644 --- a/js/packages/teams-ai/src/MessageExtensions.spec.ts +++ b/js/packages/teams-ai/src/MessageExtensions.spec.ts @@ -1,7 +1,8 @@ import sinon from 'sinon'; import { strict as assert } from 'assert'; + import { Application, Query } from './Application'; -import { createTestInvoke } from './internals/TestUtilities'; +import { createTestInvoke } from './internals/testing/TestUtilities'; import { MessageExtensions, MessageExtensionsInvokeNames } from './MessageExtensions'; import { Channels, diff --git a/js/packages/teams-ai/src/TaskModules.spec.ts b/js/packages/teams-ai/src/TaskModules.spec.ts index 10c89841a..792cc9834 100644 --- a/js/packages/teams-ai/src/TaskModules.spec.ts +++ b/js/packages/teams-ai/src/TaskModules.spec.ts @@ -1,7 +1,5 @@ import sinon from 'sinon'; import { strict as assert } from 'assert'; -import { Application } from './Application'; -import { createTestInvoke } from './internals'; import { ActivityTypes, BotConfigAuth, @@ -16,6 +14,9 @@ import { TestAdapter, TurnContext } from 'botbuilder'; + +import { Application } from './Application'; +import { createTestInvoke } from './internals/testing/TestUtilities'; import { TaskModules, TaskModuleInvokeNames } from './TaskModules'; describe('TaskModules', () => { diff --git a/js/packages/teams-ai/src/TurnState.ts b/js/packages/teams-ai/src/TurnState.ts index 18993e718..ff7516d39 100644 --- a/js/packages/teams-ai/src/TurnState.ts +++ b/js/packages/teams-ai/src/TurnState.ts @@ -111,6 +111,15 @@ export interface DefaultTempState { * } * ``` */ +/** + * Represents the turn state for a conversation. + * Turn state includes conversation state, user state, and temporary state. + * Provides methods to access, modify, and delete the state objects. + * @template TConversationState + * @param {TConversationState} TConversationState The type of the conversation state object. + * @param {TUserState} TUserState The type of the user state object. + * @param {TTempState} TTempState - The type of the temporary state object. + */ export class TurnState< TConversationState = DefaultConversationState, TUserState = DefaultUserState, @@ -124,6 +133,12 @@ export class TurnState< /** * Accessor for the conversation state. */ + /** + * Gets the conversation state from the turn state. + * @template TConversationState + * @returns {TConversationState} The conversation state. + * @throws Error if TurnState hasn't been loaded. Call loadState() first. + */ public get conversation(): TConversationState { const scope = this.getScope(CONVERSATION_SCOPE); if (!scope) { @@ -134,7 +149,7 @@ export class TurnState< /** * Replaces the conversation state with a new value. - * @param value New value to replace the conversation state with. + * @param {TConversationState} value New value to replace the conversation state with. */ public set conversation(value: TConversationState) { const scope = this.getScope(CONVERSATION_SCOPE); @@ -146,6 +161,7 @@ export class TurnState< /** * Gets a value indicating whether the applications turn state has been loaded. + * @returns {boolean} True if the applications turn state has been loaded, false otherwise. */ public get isLoaded(): boolean { return this._isLoaded; @@ -153,6 +169,8 @@ export class TurnState< /** * Accessor for the temp state. + @returns {TTempState} The temp TurnState. + @throws Error if TurnState hasn't been loaded. Call loadState() first. */ public get temp(): TTempState { const scope = this.getScope(TEMP_SCOPE); @@ -164,7 +182,8 @@ export class TurnState< /** * Replaces the temp state with a new value. - * @param value New value to replace the temp state with. + * @param {TTempState} value New value to replace the temp state with. + * @throws Error if TurnState hasn't been loaded. Call loadState() first. */ public set temp(value: TTempState) { const scope = this.getScope(TEMP_SCOPE); @@ -176,6 +195,7 @@ export class TurnState< /** * Accessor for the user state. + * @returns {TUserState} The user TurnState. */ public get user(): TUserState { const scope = this.getScope(USER_SCOPE); @@ -231,8 +251,8 @@ export class TurnState< /** * Gets a state scope by name. - * @param scope Name of the state scope to return. (i.e. 'conversation', 'user', or 'temp') - * @returns The state scope or undefined if not found. + * @param {string} scope Name of the state scope to return. (i.e. 'conversation', 'user', or 'temp') + * @returns {string | undefined} The state scope or undefined if not found. */ public getScope(scope: string): TurnStateEntry | undefined { return this._scopes[scope]; @@ -240,7 +260,7 @@ export class TurnState< /** * Deletes a value from the memory. - * @param path Path to the value to delete in the form of `[scope].property`. If scope is omitted, the value is deleted from the temporary scope. + * @param {string} path Path to the value to delete in the form of `[scope].property`. If scope is omitted, the value is deleted from the temporary scope. */ public deleteValue(path: string): void { const { scope, name } = this.getScopeAndName(path); @@ -251,8 +271,8 @@ export class TurnState< /** * Checks if a value exists in the memory. - * @param path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. - * @returns True if the value exists, false otherwise. + * @param {string} path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. + * @returns {boolean} True if the value exists, false otherwise. */ public hasValue(path: string): boolean { const { scope, name } = this.getScopeAndName(path); @@ -261,8 +281,9 @@ export class TurnState< /** * Retrieves a value from the memory. - * @param path Path to the value to retrieve in the form of `[scope].property`. If scope is omitted, the value is retrieved from the temporary scope. - * @returns The value or undefined if not found. + * @template TValue + * @param {TValue} path Path to the value to retrieve in the form of `[scope].property`. If scope is omitted, the value is retrieved from the temporary scope. + * @returns {string} The value or undefined if not found. */ public getValue(path: string): TValue { const { scope, name } = this.getScopeAndName(path); @@ -271,8 +292,8 @@ export class TurnState< /** * Assigns a value to the memory. - * @param path Path to the value to assign in the form of `[scope].property`. If scope is omitted, the value is assigned to the temporary scope. - * @param value Value to assign. + * @param {string} path Path to the value to assign in the form of `[scope].property`. If scope is omitted, the value is assigned to the temporary scope. + * @param {unknown} value Value to assign. */ public setValue(path: string, value: unknown): void { const { scope, name } = this.getScopeAndName(path); @@ -281,9 +302,9 @@ export class TurnState< /** * Loads all of the state scopes for the current turn. - * @param context Context for the current turn of conversation with the user. - * @param storage Optional. Storage provider to load state scopes from. - * @returns True if the states needed to be loaded. + * @param {TurnContext} context Context for the current turn of conversation with the user. + * @param {Storage} storage Optional. Storage provider to load state scopes from. + * @returns {boolean} True if the states needed to be loaded. */ public load(context: TurnContext, storage?: Storage): Promise { // Only load on first call @@ -338,8 +359,8 @@ export class TurnState< /** * Saves all of the state scopes for the current turn. - * @param context Context for the current turn of conversation with the user. - * @param storage Optional. Storage provider to save state scopes to. + * @param {TurnContext} context Context for the current turn of conversation with the user. + * @param {Storage} storage Optional. Storage provider to save state scopes to. */ public async save(context: TurnContext, storage?: Storage): Promise { // Check for existing load operation @@ -404,8 +425,9 @@ export class TurnState< * Computes the storage keys for the state scopes being persisted. * @remarks * Can be overridden in derived classes to add additional storage scopes. - * @param context Context for the current turn of conversation with the user. - * @returns A dictionary of scope names -> storage keys. + * @param {TurnContext} context Context for the current turn of conversation with the user. + * @returns {Promise>} A dictionary of scope names -> storage keys. + * @throws Error if the context is missing a required property. */ protected onComputeStorageKeys(context: TurnContext): Promise> { // Compute state keys @@ -438,8 +460,9 @@ export class TurnState< } /** - * @param path * @private + * @param {string} path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. + * @returns {{ scope: TurnStateEntry; name: string }} Scope and name. */ private getScopeAndName(path: string): { scope: TurnStateEntry; name: string } { // Get variable scope and name @@ -461,7 +484,6 @@ export class TurnState< /** * Accessor class for managing an individual state scope. - * @template TValue Optional. Strongly typed value of the state scope. */ export class TurnStateEntry { private _value: Record; @@ -471,7 +493,7 @@ export class TurnStateEntry { /** * Creates a new instance of the `TurnStateEntry` class. - * @param {TValue} value Optional. Value to initialize the state scope with. The default is an {} object. + * @param {Record} value Optional. Value to initialize the state scope with. The default is an {} object. * @param {string} storageKey Optional. Storage key to use when persisting the state scope. */ public constructor(value?: Record, storageKey?: string) { @@ -482,7 +504,7 @@ export class TurnStateEntry { /** * Gets a value indicating whether the state scope has changed since it was last loaded. - * @returns A value indicating whether the state scope has changed. + * @returns {boolean} A value indicating whether the state scope has changed. */ public get hasChanged(): boolean { return JSON.stringify(this._value) != this._hash; @@ -490,7 +512,7 @@ export class TurnStateEntry { /** * Gets a value indicating whether the state scope has been deleted. - * @returns A value indicating whether the state scope has been deleted. + * @returns {boolean} A value indicating whether the state scope has been deleted. */ public get isDeleted(): boolean { return this._deleted; @@ -498,7 +520,7 @@ export class TurnStateEntry { /** * Gets the value of the state scope. - * @returns The value of the state scope. + * @returns {Record} value of the state scope. */ public get value(): Record { if (this.isDeleted) { @@ -527,6 +549,7 @@ export class TurnStateEntry { /** * Replaces the state scope with a new value. + * @template TValue * @param {TValue} value New value to replace the state scope with. */ public replace(value?: Record): void { diff --git a/js/packages/teams-ai/src/augmentations/DefaultAugmentation.spec.ts b/js/packages/teams-ai/src/augmentations/DefaultAugmentation.spec.ts index adb35b2b4..f81ccf0c9 100644 --- a/js/packages/teams-ai/src/augmentations/DefaultAugmentation.spec.ts +++ b/js/packages/teams-ai/src/augmentations/DefaultAugmentation.spec.ts @@ -1,9 +1,10 @@ import assert from 'assert'; -import { DefaultAugmentation } from './DefaultAugmentation'; import { TestAdapter } from 'botbuilder'; -import { TestTurnState } from '../TestTurnState'; -import { GPT3Tokenizer } from '../tokenizers'; + +import { TestTurnState } from '../internals/testing/TestTurnState'; import { PromptResponse } from '../models'; +import { GPT3Tokenizer } from '../tokenizers'; +import { DefaultAugmentation } from './DefaultAugmentation'; describe('DefaultAugmentation', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/augmentations/MonologueAugmentation.spec.ts b/js/packages/teams-ai/src/augmentations/MonologueAugmentation.spec.ts index 25e3bc507..36f89893d 100644 --- a/js/packages/teams-ai/src/augmentations/MonologueAugmentation.spec.ts +++ b/js/packages/teams-ai/src/augmentations/MonologueAugmentation.spec.ts @@ -1,10 +1,11 @@ import { strict as assert } from 'assert'; -import { MonologueAugmentation } from './MonologueAugmentation'; import { TestAdapter } from 'botbuilder'; + import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { ChatCompletionAction, PromptResponse } from '../models'; -import { TestPromptManager } from '../prompts'; +import { MonologueAugmentation } from './MonologueAugmentation'; describe('MonologueAugmentation', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/augmentations/SequenceAugmentation.spec.ts b/js/packages/teams-ai/src/augmentations/SequenceAugmentation.spec.ts index 79522f92f..d1aea0314 100644 --- a/js/packages/teams-ai/src/augmentations/SequenceAugmentation.spec.ts +++ b/js/packages/teams-ai/src/augmentations/SequenceAugmentation.spec.ts @@ -1,10 +1,11 @@ -import { TestAdapter } from 'botbuilder'; -import { TestPromptManager } from '../prompts'; -import { GPT3Tokenizer } from '../tokenizers'; import assert from 'assert'; +import { TestAdapter } from 'botbuilder'; + +import { TestPromptManager } from '../internals/testing/TestPromptManager'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { ChatCompletionAction, PromptResponse } from '../models'; +import { GPT3Tokenizer } from '../tokenizers'; import { SequenceAugmentation } from './SequenceAugmentation'; -import { TestTurnState } from '../TestTurnState'; describe('SequenceAugmentation', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/embeddings/OpenAIEmbeddings.ts b/js/packages/teams-ai/src/embeddings/OpenAIEmbeddings.ts index 0f49611ff..16de606f2 100644 --- a/js/packages/teams-ai/src/embeddings/OpenAIEmbeddings.ts +++ b/js/packages/teams-ai/src/embeddings/OpenAIEmbeddings.ts @@ -107,7 +107,7 @@ export class OpenAIEmbeddings implements EmbeddingsModel { /** * Creates a new `OpenAIEmbeddings` instance. - * @param options Options for configuring the embeddings client. + * @param {OpenAIEmbeddingsOptions | AzureOpenAIEmbeddingsOptions} options Options for configuring the embeddings client. */ public constructor(options: OpenAIEmbeddingsOptions | AzureOpenAIEmbeddingsOptions) { // Check for azure config @@ -152,9 +152,9 @@ export class OpenAIEmbeddings implements EmbeddingsModel { /** * Creates embeddings for the given inputs using the OpenAI API. - * @param model Name of the model to use (or deployment for Azure). - * @param inputs Text inputs to create embeddings for. - * @returns A `EmbeddingsResponse` with a status and the generated embeddings or a message when an error occurs. + * @param {string} model Name of the model to use (or deployment for Azure). + * @param {string | string[]} inputs Text inputs to create embeddings for. + * @returns {Promise} A `EmbeddingsResponse` with a status and the generated embeddings or a message when an error occurs. */ public async createEmbeddings(model: string, inputs: string | string[]): Promise { if (this.options.logRequests) { @@ -192,8 +192,9 @@ export class OpenAIEmbeddings implements EmbeddingsModel { } /** - * @param request * @private + * @param {CreateEmbeddingRequest} request The request to send to the OpenAI API. + * @returns {Promise>} A promise that resolves to the response from the OpenAI API. */ protected createEmbeddingRequest(request: CreateEmbeddingRequest): Promise> { if (this._useAzure) { @@ -211,10 +212,12 @@ export class OpenAIEmbeddings implements EmbeddingsModel { } /** - * @param url - * @param body - * @param retryCount * @private + * @template TData Optional. Type of the data associated with the action. + * @param {string} url The URL to send the request to. + * @param {object} body The body of the request. + * @param {number} retryCount The number of times the request has been retried. + * @returns {Promise>} A promise that resolves to the response from the OpenAI API. */ protected async post(url: string, body: object, retryCount = 0): Promise> { // Initialize request config diff --git a/js/packages/teams-ai/src/embeddings/index.ts b/js/packages/teams-ai/src/embeddings/index.ts index 34928b5c8..4786e3a81 100644 --- a/js/packages/teams-ai/src/embeddings/index.ts +++ b/js/packages/teams-ai/src/embeddings/index.ts @@ -8,4 +8,3 @@ export * from './EmbeddingsModel'; export * from './OpenAIEmbeddings'; -export * from './TestEmbeddings'; diff --git a/js/packages/teams-ai/src/index.ts b/js/packages/teams-ai/src/index.ts index e4bafe9dd..c01c42a60 100644 --- a/js/packages/teams-ai/src/index.ts +++ b/js/packages/teams-ai/src/index.ts @@ -25,7 +25,6 @@ export * from './MemoryFork'; export * from './MessageExtensions'; export * from './TaskModules'; export * from './TeamsAttachmentDownloader'; -export * from './TestTurnState'; export * from './TurnState'; export * from './Utilities'; export * from './authentication/TeamsBotSsoPrompt'; diff --git a/js/packages/teams-ai/src/internals/AzureOpenAIClient.spec.ts b/js/packages/teams-ai/src/internals/AzureOpenAIClient.spec.ts index 1cc563a3b..c53ab71b4 100644 --- a/js/packages/teams-ai/src/internals/AzureOpenAIClient.spec.ts +++ b/js/packages/teams-ai/src/internals/AzureOpenAIClient.spec.ts @@ -1,7 +1,7 @@ import assert from 'assert'; import { AzureOpenAIClient, AzureOpenAIClientOptions } from './AzureOpenAIClient'; import { CreateChatCompletionRequest, CreateEmbeddingRequest, ModerationInput } from './types'; -import sinon, { SinonStub } from 'sinon'; +import sinon, { createSandbox } from 'sinon'; import axios from 'axios'; describe('AzureOpenAIClient', () => { @@ -9,7 +9,8 @@ describe('AzureOpenAIClient', () => { let client: AzureOpenAIClient; let clientWithApiVersion: AzureOpenAIClient; let cognitiveServiceClient: AzureOpenAIClient; - let createStub: SinonStub; + let sinonSandbox: sinon.SinonSandbox; + let createStub: sinon.SinonStub; const options: AzureOpenAIClientOptions = { apiKey: 'mock-key', @@ -98,14 +99,16 @@ describe('AzureOpenAIClient', () => { }; beforeEach(() => { - createStub = sinon.stub(axios, 'create').returns(mockAxios); + sinonSandbox = createSandbox(); + createStub = sinonSandbox.stub(axios, 'create').returns(mockAxios); + client = new AzureOpenAIClient(options); clientWithApiVersion = new AzureOpenAIClient(optionsWithApiVersion); cognitiveServiceClient = new AzureOpenAIClient(cognitiveServiceOptions); }); afterEach(() => { - sinon.restore(); + sinonSandbox.restore(); }); describe('constructor', () => { @@ -137,7 +140,7 @@ describe('AzureOpenAIClient', () => { describe('createChatCompletion', () => { it('creates valid chat completion response', async () => { - const postStub = sinon.stub(mockAxios, 'post').returns(Promise.resolve(chatCompletionResponse)); + const postStub = sinonSandbox.stub(mockAxios, 'post').returns(Promise.resolve(chatCompletionResponse)); const url = `${options.endpoint}/openai/deployments/${chatCompletionRequest.model}/chat/completions?api-version=2023-03-15-preview`; const response = await client.createChatCompletion(chatCompletionRequest); @@ -150,7 +153,7 @@ describe('AzureOpenAIClient', () => { }); it('creates valid chat completion response, with api version specified', async () => { - const postStub = sinon.stub(mockAxios, 'post').returns(Promise.resolve(chatCompletionResponse)); + const postStub = sinonSandbox.stub(mockAxios, 'post').returns(Promise.resolve(chatCompletionResponse)); const url = `${optionsWithApiVersion.endpoint}/openai/deployments/${chatCompletionRequest.model}/chat/completions?api-version=${optionsWithApiVersion.apiVersion}`; const response = await clientWithApiVersion.createChatCompletion(chatCompletionRequest); @@ -165,7 +168,7 @@ describe('AzureOpenAIClient', () => { describe('createEmbedding', () => { it('creates valid embedding response', async () => { - const postStub = sinon.stub(mockAxios, 'post').returns(Promise.resolve(embeddingResponse)); + const postStub = sinonSandbox.stub(mockAxios, 'post').returns(Promise.resolve(embeddingResponse)); const url = `${options.endpoint}/openai/deployments/${embeddingRequest.model}/embeddings?api-version=2022-12-01`; const response = await client.createEmbedding(embeddingRequest); @@ -178,7 +181,7 @@ describe('AzureOpenAIClient', () => { }); it('creates valid embedding response with api version specified', async () => { - const postStub = sinon.stub(mockAxios, 'post').returns(Promise.resolve(embeddingResponse)); + const postStub = sinonSandbox.stub(mockAxios, 'post').returns(Promise.resolve(embeddingResponse)); const url = `${optionsWithApiVersion.endpoint}/openai/deployments/${embeddingRequest.model}/embeddings?api-version=${optionsWithApiVersion.apiVersion}`; const response = await clientWithApiVersion.createEmbedding(embeddingRequest); @@ -193,7 +196,7 @@ describe('AzureOpenAIClient', () => { describe('createModeration', () => { it('creates valid moderation response', async () => { - const postStub = sinon.stub(mockAxios, 'post').returns(Promise.resolve(moderationResponse)); + const postStub = sinonSandbox.stub(mockAxios, 'post').returns(Promise.resolve(moderationResponse)); const url = `${cognitiveServiceOptions.endpoint}/contentsafety/text:analyze?api-version=${cognitiveServiceOptions.apiVersion}`; const response = await cognitiveServiceClient.createModeration(moderationRequest); diff --git a/js/packages/teams-ai/src/internals/OpenAIClient.spec.ts b/js/packages/teams-ai/src/internals/OpenAIClient.spec.ts index 6e941e339..32ed07990 100644 --- a/js/packages/teams-ai/src/internals/OpenAIClient.spec.ts +++ b/js/packages/teams-ai/src/internals/OpenAIClient.spec.ts @@ -1,14 +1,15 @@ import assert from 'assert'; import { OpenAIClient, OpenAIClientOptions } from './OpenAIClient'; import { CreateChatCompletionRequest, CreateEmbeddingRequest, CreateModerationRequest } from './types'; -import sinon, { SinonStub } from 'sinon'; +import sinon, { createSandbox } from 'sinon'; import axios from 'axios'; describe('OpenAIClient', () => { const mockAxios = axios; let client: OpenAIClient; let clientWithAllFields: OpenAIClient; - let createStub: SinonStub; + let sinonSandbox: sinon.SinonSandbox; + let createStub: sinon.SinonStub; const options: OpenAIClientOptions = { apiKey: 'mock-key' @@ -86,13 +87,14 @@ describe('OpenAIClient', () => { }; beforeEach(() => { - createStub = sinon.stub(axios, 'create').returns(mockAxios); + sinonSandbox = createSandbox(); + createStub = sinonSandbox.stub(axios, 'create').returns(mockAxios); client = new OpenAIClient(options); clientWithAllFields = new OpenAIClient(optionsWithAllFields); }); afterEach(() => { - sinon.restore(); + sinonSandbox.restore(); }); describe('constructor', () => { @@ -134,7 +136,7 @@ describe('OpenAIClient', () => { describe('createChatCompletion', () => { it('creates valid chat completion response with no endpoint', async () => { - const postStub = sinon.stub(mockAxios, 'post').returns(Promise.resolve(chatCompletionResponse)); + const postStub = sinonSandbox.stub(mockAxios, 'post').returns(Promise.resolve(chatCompletionResponse)); const url = `https://api.openai.com/v1/chat/completions`; const response = await client.createChatCompletion(chatCompletionRequest); @@ -146,7 +148,7 @@ describe('OpenAIClient', () => { assert.equal(response.data?.object, 'chat.completion'); }); it('creates valid chat completion response with valid endpoint', async () => { - const postStub = sinon.stub(mockAxios, 'post').returns(Promise.resolve(chatCompletionResponse)); + const postStub = sinonSandbox.stub(mockAxios, 'post').returns(Promise.resolve(chatCompletionResponse)); const url = `${optionsWithAllFields.endpoint}/v1/chat/completions`; const response = await clientWithAllFields.createChatCompletion(chatCompletionRequest); @@ -161,7 +163,7 @@ describe('OpenAIClient', () => { describe('createEmbedding', () => { it('creates valid embedding response with no endpoint', async () => { - const postStub = sinon.stub(mockAxios, 'post').returns(Promise.resolve(embeddingResponse)); + const postStub = sinonSandbox.stub(mockAxios, 'post').returns(Promise.resolve(embeddingResponse)); const url = `https://api.openai.com/v1/embeddings`; const response = await client.createEmbedding(embeddingRequest); @@ -174,7 +176,7 @@ describe('OpenAIClient', () => { }); it('creates valid embedding response with valid endpoint', async () => { - const postStub = sinon.stub(mockAxios, 'post').returns(Promise.resolve(embeddingResponse)); + const postStub = sinonSandbox.stub(mockAxios, 'post').returns(Promise.resolve(embeddingResponse)); const url = `${optionsWithAllFields.endpoint}/v1/embeddings`; const response = await clientWithAllFields.createEmbedding(embeddingRequest); @@ -189,7 +191,7 @@ describe('OpenAIClient', () => { describe('createModeration', () => { it('creates valid moderation response with no endpoint', async () => { - const postStub = sinon.stub(mockAxios, 'post').returns(Promise.resolve(moderationResponse)); + const postStub = sinonSandbox.stub(mockAxios, 'post').returns(Promise.resolve(moderationResponse)); const url = `https://api.openai.com/v1/moderations`; const response = await client.createModeration(moderationRequest); @@ -200,7 +202,7 @@ describe('OpenAIClient', () => { }); it('creates valid moderation response with valid endpoint', async () => { - const postStub = sinon.stub(mockAxios, 'post').returns(Promise.resolve(moderationResponse)); + const postStub = sinonSandbox.stub(mockAxios, 'post').returns(Promise.resolve(moderationResponse)); const url = `${optionsWithAllFields.endpoint}/v1/moderations`; const response = await clientWithAllFields.createModeration(moderationRequest); diff --git a/js/packages/teams-ai/src/internals/index.ts b/js/packages/teams-ai/src/internals/index.ts index f4bdc2880..a8394d057 100644 --- a/js/packages/teams-ai/src/internals/index.ts +++ b/js/packages/teams-ai/src/internals/index.ts @@ -9,5 +9,4 @@ export * from './AzureOpenAIClient'; export * from './Colorize'; export * from './OpenAIClient'; -export * from './TestUtilities'; export * from './types'; diff --git a/js/packages/teams-ai/src/embeddings/TestEmbeddings.ts b/js/packages/teams-ai/src/internals/testing/TestEmbeddings.ts similarity index 78% rename from js/packages/teams-ai/src/embeddings/TestEmbeddings.ts rename to js/packages/teams-ai/src/internals/testing/TestEmbeddings.ts index 743528f95..8f2ecbe37 100644 --- a/js/packages/teams-ai/src/embeddings/TestEmbeddings.ts +++ b/js/packages/teams-ai/src/internals/testing/TestEmbeddings.ts @@ -6,7 +6,7 @@ * Licensed under the MIT License. */ -import { EmbeddingsModel, EmbeddingsResponse, EmbeddingsResponseStatus } from './EmbeddingsModel'; +import { EmbeddingsModel, EmbeddingsResponse, EmbeddingsResponseStatus } from '../../embeddings/EmbeddingsModel'; /** * A test model that can be used to test the prompt completion system. @@ -19,9 +19,9 @@ export class TestEmbeddings implements EmbeddingsModel { /** * - * @param status Optional. Status of the embeddings response. Defaults to `success`. - * @param output Optional. Embeddings to generate. Defaults to `[[1,2,3,4,5]]`. - * @param message Optional. Message to return with response. + * @param {EmbeddingsResponseStatus} status Optional. Status of the embeddings response. Defaults to `success`. + * @param {number[][] | undefined} output Optional. Embeddings to generate. Defaults to `[[1,2,3,4,5]]`. + * @param {string} message Optional. Message to return with response. */ public constructor( status: EmbeddingsResponseStatus = 'success', @@ -49,9 +49,9 @@ export class TestEmbeddings implements EmbeddingsModel { /** * Returns a generated set of test embeddings - * @param model Name of the model to use (or deployment for Azure). - * @param inputs Input to generate embeddings for. - * @returns The generated embeddings. + * @param {string} model Name of the model to use (or deployment for Azure). + * @param {string | string[]} inputs Input to generate embeddings for. + * @returns {Promise} The generated embeddings. */ public createEmbeddings(model: string, inputs: string | string[]): Promise { // Validate inputs diff --git a/js/packages/teams-ai/src/TestMemoryFork.ts b/js/packages/teams-ai/src/internals/testing/TestMemoryFork.ts similarity index 66% rename from js/packages/teams-ai/src/TestMemoryFork.ts rename to js/packages/teams-ai/src/internals/testing/TestMemoryFork.ts index c970a4a7c..d055f8ca4 100644 --- a/js/packages/teams-ai/src/TestMemoryFork.ts +++ b/js/packages/teams-ai/src/internals/testing/TestMemoryFork.ts @@ -1,4 +1,4 @@ -import { Memory } from './MemoryFork'; +import { Memory } from '../../MemoryFork'; /** * @private @@ -13,7 +13,7 @@ export class TestMemoryFork implements Memory { /** * Deletes the value from the original memory. - * @param path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. + * @param {string} path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. */ public deleteValue(path: string): void { const { scope, name } = this.getScopeAndName(path); @@ -24,7 +24,8 @@ export class TestMemoryFork implements Memory { /** * Checks if the value exists in the original memory. - * @param path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. + * @param {string} path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. + * @returns {boolean} True if the value exists. Otherwise, false. */ public hasValue(path: string): boolean { const { scope, name } = this.getScopeAndName(path); @@ -36,8 +37,10 @@ export class TestMemoryFork implements Memory { } /** + * @template TValue * Retrieves the value from the original memory. Otherwise, returns null if value does not exist. - * @param path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. + * @param {string} path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. + * @returns {TValue} Value. */ public getValue(path: string): TValue { const { scope, name } = this.getScopeAndName(path); @@ -52,8 +55,9 @@ export class TestMemoryFork implements Memory { /** * Sets the value in the original memory. - * @param path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. - * @param value Value to assign. + * @param {string} path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. + * @param {unknown} value Value to assign. + * @returns {void} */ public setValue(path: string, value: unknown): void { const { scope, name } = this.getScopeAndName(path); @@ -65,8 +69,9 @@ export class TestMemoryFork implements Memory { } /** - * @param path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. * @private + * @param {string} path Path to the value to check in the form of `[scope].property`. If scope is omitted, the value is checked in the temporary scope. + * @returns {{ scope: string; name: string }} Scope and name. */ private getScopeAndName(path: string): { scope: string; name: string } { // Get variable scope and name diff --git a/js/packages/teams-ai/src/models/TestModel.spec.ts b/js/packages/teams-ai/src/internals/testing/TestModel.spec.ts similarity index 90% rename from js/packages/teams-ai/src/models/TestModel.spec.ts rename to js/packages/teams-ai/src/internals/testing/TestModel.spec.ts index 6711d0bcc..1b4c0cc82 100644 --- a/js/packages/teams-ai/src/models/TestModel.spec.ts +++ b/js/packages/teams-ai/src/internals/testing/TestModel.spec.ts @@ -1,9 +1,11 @@ import { strict as assert } from 'assert'; -import { TestModel } from './TestModel'; import { TestAdapter } from 'botbuilder'; -import { TestTurnState } from '../TestTurnState'; -import { GPT3Tokenizer } from '../tokenizers'; -import { PromptTemplate, SystemMessage, TestPromptManager } from '../prompts'; + +import { PromptTemplate, SystemMessage } from '../../prompts'; +import { GPT3Tokenizer } from '../../tokenizers'; +import { TestTurnState } from './TestTurnState'; +import { TestPromptManager } from './TestPromptManager'; +import { TestModel } from './TestModel'; describe('TestModel', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/models/TestModel.ts b/js/packages/teams-ai/src/internals/testing/TestModel.ts similarity index 58% rename from js/packages/teams-ai/src/models/TestModel.ts rename to js/packages/teams-ai/src/internals/testing/TestModel.ts index d04305291..b9ef7d656 100644 --- a/js/packages/teams-ai/src/models/TestModel.ts +++ b/js/packages/teams-ai/src/internals/testing/TestModel.ts @@ -7,10 +7,11 @@ */ import { TurnContext } from 'botbuilder'; -import { Message, PromptFunctions, PromptTemplate } from '../prompts'; -import { PromptCompletionModel, PromptResponse, PromptResponseStatus } from './PromptCompletionModel'; -import { Tokenizer } from '../tokenizers'; -import { Memory } from '../MemoryFork'; + +import { Memory } from '../../MemoryFork'; +import { PromptCompletionModel, PromptResponse, PromptResponseStatus } from '../../models/PromptCompletionModel'; +import { Message, PromptFunctions, PromptTemplate } from '../../prompts'; +import { Tokenizer } from '../../tokenizers'; /** * A test model that can be used to test the prompt completion system. @@ -18,9 +19,9 @@ import { Memory } from '../MemoryFork'; export class TestModel implements PromptCompletionModel { /** * - * @param status Optional. Status of the prompt response. Defaults to `success`. - * @param response Optional. Response to the prompt. Defaults to `{ role: 'assistant', content: 'Hello World' }`. - * @param error Optional. Error to return. Defaults to `undefined`. + * @param {PromptResponseStatus} status Optional. Status of the prompt response. Defaults to `success`. + * @param {Message} response Optional. Response to the prompt. Defaults to `{ role: 'assistant', content: 'Hello World' }`. + * @param {Error} error Optional. Error to return. Defaults to `undefined`. */ public constructor( status: PromptResponseStatus = 'success', @@ -49,12 +50,12 @@ export class TestModel implements PromptCompletionModel { /** * Completes a prompt. - * @param context Current turn context. - * @param memory An interface for accessing state values. - * @param functions Functions to use when rendering the prompt. - * @param tokenizer Tokenizer to use when rendering the prompt. - * @param template Prompt template to complete. - * @returns A `PromptResponse` with the status and message. + * @param {TurnContext} context Current turn context. + * @param {Memory} memory An interface for accessing state values. + * @param {PromptFunctions} functions Functions to use when rendering the prompt. + * @param {Tokenizer} tokenizer Tokenizer to use when rendering the prompt. + * @param {PromptTemplate} template Prompt template to complete. + * @returns {Promise>} A `PromptResponse` with the status and message. */ public async completePrompt( context: TurnContext, diff --git a/js/packages/teams-ai/src/planners/TestPlanner.ts b/js/packages/teams-ai/src/internals/testing/TestPlanner.ts similarity index 65% rename from js/packages/teams-ai/src/planners/TestPlanner.ts rename to js/packages/teams-ai/src/internals/testing/TestPlanner.ts index 3cdc5e07b..116019a05 100644 --- a/js/packages/teams-ai/src/planners/TestPlanner.ts +++ b/js/packages/teams-ai/src/internals/testing/TestPlanner.ts @@ -1,7 +1,7 @@ import { TurnContext } from 'botbuilder'; -import { Plan, Planner, PredictedSayCommand } from './Planner'; -import { TurnState } from '../TurnState'; -import { AI } from '../AI'; +import { Plan, Planner, PredictedSayCommand } from '../../planners/Planner'; +import { TurnState } from '../../TurnState'; +import { AI } from '../../AI'; /** * A planner used for testing. @@ -9,8 +9,8 @@ import { AI } from '../AI'; export class TestPlanner implements Planner { /** * Creates a new `TestPlanner` instance. - * @param beginPlan Optional. The plan to return when `beginTask()` is called. Defaults to a plan that says "Hello World". - * @param continuePlan Optional. The plan to return when `continueTask()` is called. Defaults to an empty plan. + * @param {Plan} beginPlan Optional. The plan to return when `beginTask()` is called. Defaults to a plan that says "Hello World". + * @param {Plan} continuePlan Optional. The plan to return when `continueTask()` is called. Defaults to an empty plan. */ public constructor(beginPlan?: Plan, continuePlan?: Plan) { this.beginPlan = beginPlan || { @@ -41,10 +41,10 @@ export class TestPlanner implements Planner { * there is no work to be performed. * * The planner should take the users input from `state.temp.input`. - * @param context Context for the current turn of conversation. - * @param state Application state for the current turn of conversation. - * @param ai The AI system that is generating the plan. - * @returns The plan that was generated. + * @param {TurnContext} context Context for the current turn of conversation. + * @param {TurnState} state Application state for the current turn of conversation. + * @param {AI} ai The AI system that is generating the plan. + * @returns {Promise} The plan that was generated. */ public beginTask(context: TurnContext, state: TurnState, ai: AI): Promise { return Promise.resolve(this.beginPlan); @@ -59,10 +59,10 @@ export class TestPlanner implements Planner { * to be performed. * * The output from the last plan step that was executed is passed to the planner via `state.temp.input`. - * @param context Context for the current turn of conversation. - * @param state Application state for the current turn of conversation. - * @param ai The AI system that is generating the plan. - * @returns The plan that was generated. + * @param {TurnContext} context Context for the current turn of conversation. + * @param {TurnState} state Application state for the current turn of conversation. + * @param {AI} ai The AI system that is generating the plan. + * @returns {Promise} The plan that was generated. */ public continueTask(context: TurnContext, state: TurnState, ai: AI): Promise { return Promise.resolve(this.continuePlan); diff --git a/js/packages/teams-ai/src/prompts/TestPromptManager.ts b/js/packages/teams-ai/src/internals/testing/TestPromptManager.ts similarity index 72% rename from js/packages/teams-ai/src/prompts/TestPromptManager.ts rename to js/packages/teams-ai/src/internals/testing/TestPromptManager.ts index aee3cd3cd..9977fe0a4 100644 --- a/js/packages/teams-ai/src/prompts/TestPromptManager.ts +++ b/js/packages/teams-ai/src/internals/testing/TestPromptManager.ts @@ -6,8 +6,8 @@ * Licensed under the MIT License. */ -import { PromptManager, PromptManagerOptions } from './PromptManager'; -import { PromptTemplate } from './PromptTemplate'; +import { PromptManager, PromptManagerOptions } from '../../prompts/PromptManager'; +import { PromptTemplate } from '../../prompts/PromptTemplate'; /** * Options used to configure a `TestPromptManager` instance. @@ -25,7 +25,8 @@ export interface TestPromptManagerOptions extends PromptManagerOptions { export class TestPromptManager extends PromptManager { /** * Creates a new `TestPromptManager` instance. - * @param options Optional. Options used to configure the prompt manager. + * @param {Partial} options Optional. Options used to configure the prompt manager. + * @returns {TestPromptManager} A new `TestPromptManager` instance. */ public constructor(options: Partial = {}) { super( @@ -44,7 +45,8 @@ export class TestPromptManager extends PromptManager { } /** - * @param name + * @param {string} name of the PromptTemplate to retrieve. + * @returns {Promise} The PromptTemplate with the given name. * @private */ public override getPrompt(name: string): Promise { diff --git a/js/packages/teams-ai/src/TestTurnState.ts b/js/packages/teams-ai/src/internals/testing/TestTurnState.ts similarity index 64% rename from js/packages/teams-ai/src/TestTurnState.ts rename to js/packages/teams-ai/src/internals/testing/TestTurnState.ts index f972c9c5d..4da04b757 100644 --- a/js/packages/teams-ai/src/TestTurnState.ts +++ b/js/packages/teams-ai/src/internals/testing/TestTurnState.ts @@ -1,4 +1,4 @@ -import { TurnState } from './TurnState'; +import { TurnState } from '../../TurnState'; import { MemoryStorage, TurnContext } from 'botbuilder'; /** @@ -14,12 +14,12 @@ export class TestTurnState extends TurnState { /** * Creates a new `TestTurnState` instance. - * @param context Context for the current turn of conversation with the user. - * @param testState Optional. State to initialize the new instance with. - * @param testState.user - * @param testState.conversation - * @param testState.temp - * @returns Created `TestTurnState` instance. + * @param {TurnContext} context Context for the current turn of conversation with the user. + * @param {TestTurnState} testState Optional. State to initialize the new instance with. + * @param {any} testState.user User state to initialize the new instance with. + * @param {any} testState.conversation Conversation state to initialize the new instance with. + * @param {any} testState.temp Temporary state to initialize the new instance with. + * @returns {Promise} Created `TestTurnState` instance. */ public static async create( context: TurnContext, diff --git a/js/packages/teams-ai/src/internals/TestUtilities.ts b/js/packages/teams-ai/src/internals/testing/TestUtilities.ts similarity index 100% rename from js/packages/teams-ai/src/internals/TestUtilities.ts rename to js/packages/teams-ai/src/internals/testing/TestUtilities.ts diff --git a/js/packages/teams-ai/src/moderators/AzureContentSafetyModerator.spec.ts b/js/packages/teams-ai/src/moderators/AzureContentSafetyModerator.spec.ts index f217f8c57..8df17abd0 100644 --- a/js/packages/teams-ai/src/moderators/AzureContentSafetyModerator.spec.ts +++ b/js/packages/teams-ai/src/moderators/AzureContentSafetyModerator.spec.ts @@ -1,11 +1,12 @@ -import axios from 'axios'; import { strict as assert } from 'assert'; -import sinon, { SinonSandbox, SinonStub } from 'sinon'; import { TestAdapter } from 'botbuilder'; -import { AzureContentSafetyModerator, AzureOpenAIModeratorOptions } from './AzureContentSafetyModerator'; +import axios from 'axios'; +import sinon, { SinonSandbox, SinonStub } from 'sinon'; + import { AI } from '../AI'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { Plan, PredictedDoCommand, PredictedSayCommand } from '../planners'; -import { TestTurnState } from '../TestTurnState'; +import { AzureContentSafetyModerator, AzureOpenAIModeratorOptions } from './AzureContentSafetyModerator'; describe('AzureContentSafetyModerator', () => { const mockAxios = axios; diff --git a/js/packages/teams-ai/src/moderators/DefaultModerator.spec.ts b/js/packages/teams-ai/src/moderators/DefaultModerator.spec.ts index 1c97775f5..e30eea7a9 100644 --- a/js/packages/teams-ai/src/moderators/DefaultModerator.spec.ts +++ b/js/packages/teams-ai/src/moderators/DefaultModerator.spec.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'assert'; -import { DefaultModerator } from './DefaultModerator'; import { TestAdapter } from 'botbuilder'; -import { TestTurnState } from '../TestTurnState'; +import { DefaultModerator } from './DefaultModerator'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { Plan, PredictedDoCommand } from '../planners/Planner'; describe('DefaultModerator', () => { diff --git a/js/packages/teams-ai/src/moderators/OpenAIModerator.spec.ts b/js/packages/teams-ai/src/moderators/OpenAIModerator.spec.ts index db929f4d4..e5623e1a1 100644 --- a/js/packages/teams-ai/src/moderators/OpenAIModerator.spec.ts +++ b/js/packages/teams-ai/src/moderators/OpenAIModerator.spec.ts @@ -1,10 +1,11 @@ -import axios from 'axios'; import { strict as assert } from 'assert'; -import sinon, { SinonSandbox, SinonStub } from 'sinon'; import { TestAdapter } from 'botbuilder'; +import axios from 'axios'; +import sinon, { SinonSandbox, SinonStub } from 'sinon'; + import { AI } from '../AI'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { Plan, PredictedDoCommand, PredictedSayCommand } from '../planners'; -import { TestTurnState } from '../TestTurnState'; import { OpenAIModerator, OpenAIModeratorOptions } from './OpenAIModerator'; describe('OpenAIModerator', () => { diff --git a/js/packages/teams-ai/src/planners/index.ts b/js/packages/teams-ai/src/planners/index.ts index f0b5815ff..fbf7733be 100644 --- a/js/packages/teams-ai/src/planners/index.ts +++ b/js/packages/teams-ai/src/planners/index.ts @@ -7,7 +7,8 @@ */ export * from './ActionPlanner'; -export * as preview from './AssistantsPlanner'; +// api-extractor doesn't support export * as __ from './AssistantsPlanner'; +import * as preview from './AssistantsPlanner'; +export { preview }; export * from './LLMClient'; export * from './Planner'; -export * from './TestPlanner'; diff --git a/js/packages/teams-ai/src/prompts/AssistantMessage.spec.ts b/js/packages/teams-ai/src/prompts/AssistantMessage.spec.ts index 5535a0f40..5e1ef6848 100644 --- a/js/packages/teams-ai/src/prompts/AssistantMessage.spec.ts +++ b/js/packages/teams-ai/src/prompts/AssistantMessage.spec.ts @@ -1,9 +1,9 @@ import { strict as assert } from 'assert'; -import { AssistantMessage } from './AssistantMessage'; import { TestAdapter } from 'botbuilder'; -import { TestPromptManager } from './TestPromptManager'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; +import { AssistantMessage } from './AssistantMessage'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; +import { TestTurnState } from '../internals/testing/TestTurnState'; describe('AssistantMessage', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/prompts/ConversationHistory.spec.ts b/js/packages/teams-ai/src/prompts/ConversationHistory.spec.ts index ce0870fb3..b75ad1ce2 100644 --- a/js/packages/teams-ai/src/prompts/ConversationHistory.spec.ts +++ b/js/packages/teams-ai/src/prompts/ConversationHistory.spec.ts @@ -1,9 +1,9 @@ import { strict as assert } from 'assert'; import { ConversationHistory } from './ConversationHistory'; import { TestAdapter } from 'botbuilder'; -import { TestPromptManager } from './TestPromptManager'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; +import { TestTurnState } from '../internals/testing/TestTurnState'; describe('ConversationHistory', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/prompts/DataSourceSection.spec.ts b/js/packages/teams-ai/src/prompts/DataSourceSection.spec.ts index 63585a67b..51bf09a5c 100644 --- a/js/packages/teams-ai/src/prompts/DataSourceSection.spec.ts +++ b/js/packages/teams-ai/src/prompts/DataSourceSection.spec.ts @@ -1,10 +1,10 @@ import assert from 'assert'; -import { TextDataSource } from '../dataSources/TextDataSource'; -import { DataSourceSection } from './DataSourceSection'; import { TestAdapter } from 'botbuilder-core'; -import { TestTurnState } from '../TestTurnState'; +import { DataSourceSection } from './DataSourceSection'; +import { TextDataSource } from '../dataSources/TextDataSource'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestPromptManager } from './TestPromptManager'; describe('DataSourceSection', () => { const textDataSource = new TextDataSource('testname', 'Hello World!'); diff --git a/js/packages/teams-ai/src/prompts/FunctionCallMessage.spec.ts b/js/packages/teams-ai/src/prompts/FunctionCallMessage.spec.ts index 2b82ab55f..11e237a74 100644 --- a/js/packages/teams-ai/src/prompts/FunctionCallMessage.spec.ts +++ b/js/packages/teams-ai/src/prompts/FunctionCallMessage.spec.ts @@ -1,10 +1,10 @@ import assert from 'assert'; +import { TestAdapter } from 'botbuilder-core'; import { FunctionCallMessage } from './FunctionCallMessage'; import { FunctionCall } from './Message'; -import { TestAdapter } from 'botbuilder-core'; -import { TestTurnState } from '../TestTurnState'; +import { TestTurnState } from '../internals/testing/TestTurnState'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestPromptManager } from './TestPromptManager'; describe('FunctionCallMessage', () => { const functionCall: FunctionCall = { diff --git a/js/packages/teams-ai/src/prompts/FunctionResponseMessage.spec.ts b/js/packages/teams-ai/src/prompts/FunctionResponseMessage.spec.ts index 0b87a934c..3f9b735ac 100644 --- a/js/packages/teams-ai/src/prompts/FunctionResponseMessage.spec.ts +++ b/js/packages/teams-ai/src/prompts/FunctionResponseMessage.spec.ts @@ -1,9 +1,9 @@ import assert from 'assert'; -import { FunctionResponseMessage } from './FunctionResponseMessage'; import { TestAdapter } from 'botbuilder-core'; -import { TestTurnState } from '../TestTurnState'; +import { TestTurnState } from '../internals/testing/TestTurnState'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestPromptManager } from './TestPromptManager'; +import { FunctionResponseMessage } from './FunctionResponseMessage'; describe('FunctionResponseMessage', () => { const functionName = 'foo'; diff --git a/js/packages/teams-ai/src/prompts/GroupSection.spec.ts b/js/packages/teams-ai/src/prompts/GroupSection.spec.ts index 6eb97ed1a..d2c1cca3d 100644 --- a/js/packages/teams-ai/src/prompts/GroupSection.spec.ts +++ b/js/packages/teams-ai/src/prompts/GroupSection.spec.ts @@ -1,10 +1,10 @@ import { strict as assert } from 'assert'; -import { GroupSection } from './GroupSection'; -import { TextSection } from './TextSection'; import { TestAdapter } from 'botbuilder'; -import { TestPromptManager } from './TestPromptManager'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; +import { GroupSection } from './GroupSection'; +import { TextSection } from './TextSection'; describe('GroupSection', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/prompts/LayoutEngine.ts b/js/packages/teams-ai/src/prompts/LayoutEngine.ts index 0e750edf9..fe019ebd0 100644 --- a/js/packages/teams-ai/src/prompts/LayoutEngine.ts +++ b/js/packages/teams-ai/src/prompts/LayoutEngine.ts @@ -26,10 +26,10 @@ export class LayoutEngine implements PromptSection { /** * - * @param sections List of sections to layout. - * @param tokens Sizing strategy for this section. - * @param required Indicates if this section is required. - * @param separator Separator to use between sections when rendering as text. + * @param {PromptSection[]} sections List of sections to layout. + * @param {number} tokens Sizing strategy for this section. + * @param {boolean} required Indicates if this section is required. + * @param {string} separator Separator to use between sections when rendering as text. */ public constructor(sections: PromptSection[], tokens: number, required: boolean, separator: string) { this.sections = sections; @@ -39,12 +39,13 @@ export class LayoutEngine implements PromptSection { } /** - * @param context - * @param memory - * @param functions - * @param tokenizer - * @param maxTokens * @private + * @param {TurnContext} context Context for the current turn of conversation with the user. + * @param {Memory} memory The current memory. + * @param {PromptFunctions} functions The functions available to use in the prompt. + * @param {Tokenizer} tokenizer Tokenizer to use when rendering as text. + * @param {number} maxTokens Maximum number of tokens allowed. + * @returns {Promise>} Rendered section. */ public async renderAsText( context: TurnContext, @@ -82,12 +83,13 @@ export class LayoutEngine implements PromptSection { } /** - * @param context - * @param memory - * @param functions - * @param tokenizer - * @param maxTokens * @private + * @param {TurnContext} context Context for the current turn of conversation with the user. + * @param {Memory} memory The current memory. + * @param {PromptFunctions} functions The functions available to use in the prompt. + * @param {Tokenizer} tokenizer Tokenizer to use when rendering as text. + * @param {number} maxTokens Maximum number of tokens allowed. + * @returns {Promise>} Rendered section. */ public async renderAsMessages( context: TurnContext, @@ -122,9 +124,10 @@ export class LayoutEngine implements PromptSection { } /** - * @param sections - * @param layout * @private + * @template T + * @param {PromptSection[]} sections Sections to add to the layout. + * @param {PromptSectionLayout[]} layout Layout to add the sections to. */ private addSectionsToLayout(sections: PromptSection[], layout: PromptSectionLayout[]): void { for (let i = 0; i < sections.length; i++) { @@ -138,13 +141,15 @@ export class LayoutEngine implements PromptSection { } /** - * @param layout - * @param maxTokens - * @param cbFixed - * @param cbProportional - * @param textLayout - * @param tokenizer * @private + * @template T + * @param {PromptSectionLayout[]} layout Layout to render. + * @param {number} maxTokens Maximum number of tokens allowed. + * @param {Function} cbFixed Callback to render a fixed section. + * @param {Function} cbProportional Callback to render a proportional section. + * @param {boolean} textLayout Indicates if the layout is being rendered as text. + * @param {Tokenizer} tokenizer Tokenizer to use when rendering as text. + * @returns {Promise} Number of tokens remaining. */ private async layoutSections( layout: PromptSectionLayout[], @@ -179,9 +184,10 @@ export class LayoutEngine implements PromptSection { } /** - * @param layout - * @param callback * @private + * @template T + * @param {PromptSectionLayout[]} layout Layout to render. + * @param {Function} callback Callback to render a fixed section of the layout. */ private async layoutFixedSections( layout: PromptSectionLayout[], @@ -199,9 +205,10 @@ export class LayoutEngine implements PromptSection { } /** - * @param layout - * @param callback * @private + * @template T + * @param {PromptSectionLayout[]} layout Layout to render. + * @param {Function} callback Callback to render a proportional section of the layout. */ private async layoutProportionalSections( layout: PromptSectionLayout[], @@ -219,10 +226,12 @@ export class LayoutEngine implements PromptSection { } /** - * @param layout - * @param textLayout - * @param tokenizer * @private + * @template T + * @param {PromptSectionLayout[]} layout Layout to get the length of. + * @param {boolean} textLayout Indicates if the layout is being rendered as text. + * @param {Tokenizer} tokenizer Tokenizer to use when rendering as text. + * @returns {number} Length of the layout. */ private getLayoutLength( layout: PromptSectionLayout[], @@ -252,8 +261,10 @@ export class LayoutEngine implements PromptSection { } /** - * @param layout * @private + * @template T + * @param {PromptSectionLayout[]} layout Layout to drop the last optional section from. + * @returns {boolean} True if an optional section was dropped, false otherwise. */ private dropLastOptionalSection(layout: PromptSectionLayout[]): boolean { for (let i = layout.length - 1; i >= 0; i--) { @@ -268,8 +279,10 @@ export class LayoutEngine implements PromptSection { } /** - * @param layout * @private + * @template T + * @param {PromptSectionLayout[]} layout Layout to check. + * @returns {boolean} True if the layout needs more rendering, false otherwise. */ private needsMoreLayout(layout: PromptSectionLayout[]): boolean { for (let i = 0; i < layout.length; i++) { diff --git a/js/packages/teams-ai/src/prompts/Prompt.spec.ts b/js/packages/teams-ai/src/prompts/Prompt.spec.ts index 9338c2fae..e8d04eeee 100644 --- a/js/packages/teams-ai/src/prompts/Prompt.spec.ts +++ b/js/packages/teams-ai/src/prompts/Prompt.spec.ts @@ -1,10 +1,10 @@ import { strict as assert } from 'assert'; +import { TestAdapter } from 'botbuilder'; import { Prompt } from './Prompt'; import { TextSection } from './TextSection'; -import { TestAdapter } from 'botbuilder'; -import { TestPromptManager } from './TestPromptManager'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; describe('Prompt', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/prompts/PromptManager.spec.ts b/js/packages/teams-ai/src/prompts/PromptManager.spec.ts index 7472eec3b..5f886fa4b 100644 --- a/js/packages/teams-ai/src/prompts/PromptManager.spec.ts +++ b/js/packages/teams-ai/src/prompts/PromptManager.spec.ts @@ -1,5 +1,5 @@ import { strict as assert } from 'assert'; -import { TestPromptManager } from './TestPromptManager'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; describe('PromptManager', () => { describe('constructor', () => { diff --git a/js/packages/teams-ai/src/prompts/PromptSectionBase.spec.ts b/js/packages/teams-ai/src/prompts/PromptSectionBase.spec.ts index ffb8cc3e2..b7cf0ec0f 100644 --- a/js/packages/teams-ai/src/prompts/PromptSectionBase.spec.ts +++ b/js/packages/teams-ai/src/prompts/PromptSectionBase.spec.ts @@ -1,11 +1,11 @@ import { strict as assert } from 'assert'; -import { PromptSectionBase } from './PromptSectionBase'; import { TestAdapter, TurnContext } from 'botbuilder'; -import { TestPromptManager } from './TestPromptManager'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { GPT3Tokenizer, Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; import { TurnState } from '../TurnState'; import { PromptFunctions } from './PromptFunctions'; +import { PromptSectionBase } from './PromptSectionBase'; import { RenderedPromptSection } from './PromptSection'; import { Message } from './Message'; diff --git a/js/packages/teams-ai/src/prompts/SystemMessage.spec.ts b/js/packages/teams-ai/src/prompts/SystemMessage.spec.ts index 4355dbbd0..e5c960a7d 100644 --- a/js/packages/teams-ai/src/prompts/SystemMessage.spec.ts +++ b/js/packages/teams-ai/src/prompts/SystemMessage.spec.ts @@ -1,9 +1,9 @@ import { strict as assert } from 'assert'; -import { SystemMessage } from './SystemMessage'; import { TestAdapter } from 'botbuilder'; -import { TestPromptManager } from './TestPromptManager'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; +import { SystemMessage } from './SystemMessage'; describe('SystemMessage', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/prompts/SystemMessage.ts b/js/packages/teams-ai/src/prompts/SystemMessage.ts index 0805a5562..556f8e9ad 100644 --- a/js/packages/teams-ai/src/prompts/SystemMessage.ts +++ b/js/packages/teams-ai/src/prompts/SystemMessage.ts @@ -14,8 +14,8 @@ import { TemplateSection } from './TemplateSection'; export class SystemMessage extends TemplateSection { /** * Creates a new 'SystemMessage' instance. - * @param template Template to use for this section. - * @param tokens Optional. Sizing strategy for this section. Defaults to `auto`. + * @param {string} template Template to use for this section. + * @param {number} tokens Optional. Sizing strategy for this section. Defaults to `auto`. */ public constructor(template: string, tokens: number = -1) { super(template, 'system', tokens, true, '\n', ''); diff --git a/js/packages/teams-ai/src/prompts/TemplateSection.spec.ts b/js/packages/teams-ai/src/prompts/TemplateSection.spec.ts index 3e44045a1..4ac83dca9 100644 --- a/js/packages/teams-ai/src/prompts/TemplateSection.spec.ts +++ b/js/packages/teams-ai/src/prompts/TemplateSection.spec.ts @@ -1,9 +1,9 @@ import { strict as assert } from 'assert'; import { TemplateSection } from './TemplateSection'; import { TestAdapter } from 'botbuilder'; -import { TestPromptManager } from './TestPromptManager'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; describe('TemplateSection', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/prompts/TextSection.spec.ts b/js/packages/teams-ai/src/prompts/TextSection.spec.ts index 029876a74..e065cbc39 100644 --- a/js/packages/teams-ai/src/prompts/TextSection.spec.ts +++ b/js/packages/teams-ai/src/prompts/TextSection.spec.ts @@ -1,9 +1,9 @@ import { strict as assert } from 'assert'; -import { TextSection } from './TextSection'; import { TestAdapter } from 'botbuilder'; -import { TestPromptManager } from './TestPromptManager'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; +import { TextSection } from './TextSection'; describe('TextSection', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/prompts/UserInputMessage.ts b/js/packages/teams-ai/src/prompts/UserInputMessage.ts index a736435c4..b6860f13b 100644 --- a/js/packages/teams-ai/src/prompts/UserInputMessage.ts +++ b/js/packages/teams-ai/src/prompts/UserInputMessage.ts @@ -6,14 +6,15 @@ * Licensed under the MIT License. */ +import { TurnContext } from 'botbuilder'; + +import { InputFile } from '../InputFileDownloader'; +import { Memory } from '../MemoryFork'; +import { Tokenizer } from '../tokenizers'; import { Message, MessageContentParts } from './Message'; import { PromptFunctions } from './PromptFunctions'; import { RenderedPromptSection } from './PromptSection'; import { PromptSectionBase } from './PromptSectionBase'; -import { TurnContext } from 'botbuilder'; -import { Tokenizer } from '../tokenizers'; -import { Memory } from '../MemoryFork'; -import { InputFile } from '../InputFileDownloader'; /** * A section capable of rendering user input text and images as a user message. @@ -24,9 +25,9 @@ export class UserInputMessage extends PromptSectionBase { /** * Creates a new 'UserInputMessage' instance. - * @param tokens Optional. Sizing strategy for this section. Defaults to `auto`. - * @param inputVariable Optional. Name of the variable containing the user input text. Defaults to `input`. - * @param filesVariable Optional. Name of the variable containing the user input files. Defaults to `inputFiles`. + * @param {number} tokens Optional. Sizing strategy for this section. Defaults to `auto`. + * @param {string} inputVariable Optional. Name of the variable containing the user input text. Defaults to `input`. + * @param {string} filesVariable Optional. Name of the variable containing the user input files. Defaults to `inputFiles`. */ public constructor(tokens: number = -1, inputVariable = 'input', filesVariable = 'inputFiles') { super(tokens, true, '\n', 'user: '); @@ -35,12 +36,13 @@ export class UserInputMessage extends PromptSectionBase { } /** - * @param context - * @param memory - * @param functions - * @param tokenizer - * @param maxTokens * @private + * @param {TurnContext} context Turn context for the message to be rendered. + * @param {Memory} memory Memory in storage. + * @param {PromptFunctions} functions Prompt functions. + * @param {Tokenizer} tokenizer Tokenizer. + * @param {number} maxTokens Max tokens to be used for rendering. + * @returns {Promise[]>>} Rendered prompt section. */ public async renderAsMessages( context: TurnContext, diff --git a/js/packages/teams-ai/src/prompts/UserMessage.spec.ts b/js/packages/teams-ai/src/prompts/UserMessage.spec.ts index 097939a1c..1f73c0509 100644 --- a/js/packages/teams-ai/src/prompts/UserMessage.spec.ts +++ b/js/packages/teams-ai/src/prompts/UserMessage.spec.ts @@ -1,9 +1,9 @@ import { strict as assert } from 'assert'; -import { UserMessage } from './UserMessage'; import { TestAdapter } from 'botbuilder'; -import { TestPromptManager } from './TestPromptManager'; +import { TestPromptManager } from '../internals/testing/TestPromptManager'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; +import { UserMessage } from './UserMessage'; describe('UserMessage', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/prompts/UserMessage.ts b/js/packages/teams-ai/src/prompts/UserMessage.ts index 2ba13962e..9544ce9bf 100644 --- a/js/packages/teams-ai/src/prompts/UserMessage.ts +++ b/js/packages/teams-ai/src/prompts/UserMessage.ts @@ -14,9 +14,9 @@ import { TemplateSection } from './TemplateSection'; export class UserMessage extends TemplateSection { /** * Creates a new 'UserMessage' instance. - * @param template Template to use for this section. - * @param tokens Optional. Sizing strategy for this section. Defaults to `auto`. - * @param userPrefix Optional. Prefix to use for user messages when rendering as text. Defaults to `user: `. + * @param {string} template Template to use for this section. + * @param {number} tokens Optional. Sizing strategy for this section. Defaults to `auto`. + * @param {string} userPrefix Optional. Prefix to use for user messages when rendering as text. Defaults to `user: `. */ public constructor(template: string, tokens: number = -1, userPrefix: string = 'user: ') { super(template, 'user', tokens, true, '\n', userPrefix); diff --git a/js/packages/teams-ai/src/prompts/index.ts b/js/packages/teams-ai/src/prompts/index.ts index 0151af0b2..5851101d3 100644 --- a/js/packages/teams-ai/src/prompts/index.ts +++ b/js/packages/teams-ai/src/prompts/index.ts @@ -22,7 +22,6 @@ export * from './PromptSectionBase'; export * from './PromptTemplate'; export * from './SystemMessage'; export * from './TemplateSection'; -export * from './TestPromptManager'; export * from './TextSection'; export * from './UserInputMessage'; export * from './UserMessage'; diff --git a/js/packages/teams-ai/src/validators/ActionResponseValidator.spec.ts b/js/packages/teams-ai/src/validators/ActionResponseValidator.spec.ts index 8f4ea27d0..7f7fb79e1 100644 --- a/js/packages/teams-ai/src/validators/ActionResponseValidator.spec.ts +++ b/js/packages/teams-ai/src/validators/ActionResponseValidator.spec.ts @@ -1,10 +1,10 @@ import { strict as assert } from 'assert'; -import { ActionResponseValidator } from './ActionResponseValidator'; import { TestAdapter } from 'botbuilder'; -import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { ChatCompletionAction } from '../models'; import { Message } from '../prompts'; +import { GPT3Tokenizer } from '../tokenizers'; +import { ActionResponseValidator } from './ActionResponseValidator'; describe('ActionResponseValidator', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/validators/ActionResponseValidator.ts b/js/packages/teams-ai/src/validators/ActionResponseValidator.ts index c68feefc5..75c025962 100644 --- a/js/packages/teams-ai/src/validators/ActionResponseValidator.ts +++ b/js/packages/teams-ai/src/validators/ActionResponseValidator.ts @@ -32,10 +32,10 @@ export class ActionResponseValidator implements PromptResponseValidator>} A `Validation` object. */ public async validateResponse( context: TurnContext, diff --git a/js/packages/teams-ai/src/validators/DefaultResponseValidator.spec.ts b/js/packages/teams-ai/src/validators/DefaultResponseValidator.spec.ts index 7e3d488e4..6c82bc3be 100644 --- a/js/packages/teams-ai/src/validators/DefaultResponseValidator.spec.ts +++ b/js/packages/teams-ai/src/validators/DefaultResponseValidator.spec.ts @@ -1,8 +1,8 @@ import { strict as assert } from 'assert'; -import { DefaultResponseValidator } from './DefaultResponseValidator'; import { TestAdapter } from 'botbuilder'; +import { TestTurnState } from '../internals/testing/TestTurnState'; import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; +import { DefaultResponseValidator } from './DefaultResponseValidator'; describe('DefaultResponseValidator', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/validators/DefaultResponseValidator.ts b/js/packages/teams-ai/src/validators/DefaultResponseValidator.ts index 6cdeef26e..ee37427f6 100644 --- a/js/packages/teams-ai/src/validators/DefaultResponseValidator.ts +++ b/js/packages/teams-ai/src/validators/DefaultResponseValidator.ts @@ -19,12 +19,12 @@ import { Memory } from '../MemoryFork'; export class DefaultResponseValidator implements PromptResponseValidator { /** * Validates a response to a prompt. - * @param context Context for the current turn of conversation with the user. - * @param memory An interface for accessing state values. - * @param tokenizer Tokenizer to use for encoding and decoding text. - * @param response Response to validate. - * @param remaining_attempts Number of remaining attempts to validate the response. - * @returns A `Validation` object. + * @param {TurnContext} context Context for the current turn of conversation with the user. + * @param {Memory} memory An interface for accessing state values. + * @param {Tokenizer} tokenizer Tokenizer to use for encoding and decoding text. + * @param {PromptResponse} response Response to validate. + * @param {number} remaining_attempts Number of remaining attempts to validate the response. + * @returns {PromptResponseValidator} A `Validation` object. */ public validateResponse( context: TurnContext, diff --git a/js/packages/teams-ai/src/validators/JSONResponseValidator.spec.ts b/js/packages/teams-ai/src/validators/JSONResponseValidator.spec.ts index b271b523f..384cf45dc 100644 --- a/js/packages/teams-ai/src/validators/JSONResponseValidator.spec.ts +++ b/js/packages/teams-ai/src/validators/JSONResponseValidator.spec.ts @@ -1,11 +1,11 @@ import { strict as assert } from 'assert'; import * as sinon from 'sinon'; +import { TestAdapter } from 'botbuilder'; +import { TestTurnState } from '../internals/testing/TestTurnState'; +import { GPT3Tokenizer } from '../tokenizers'; import { JSONResponseValidator } from './JSONResponseValidator'; import { Schema, ValidationError } from 'jsonschema'; -import { TestAdapter } from 'botbuilder'; -import { GPT3Tokenizer } from '../tokenizers'; -import { TestTurnState } from '../TestTurnState'; describe('JSONResponseValidator', () => { const adapter = new TestAdapter(); diff --git a/js/packages/teams-ai/src/validators/JSONResponseValidator.ts b/js/packages/teams-ai/src/validators/JSONResponseValidator.ts index 5f590342f..e137e2325 100644 --- a/js/packages/teams-ai/src/validators/JSONResponseValidator.ts +++ b/js/packages/teams-ai/src/validators/JSONResponseValidator.ts @@ -13,9 +13,9 @@ import { Memory } from '../MemoryFork'; export class JSONResponseValidator> implements PromptResponseValidator { /** * Creates a new `JSONResponseValidator` instance. - * @param schema Optional. JSON schema to validate the response against. - * @param missingJsonFeedback Optional. Custom feedback to give when no JSON is returned. - * @param errorFeedback Optional. Custom feedback prefix to use when schema errors are detected. + * @param {Schema} schema Optional. JSON schema to validate the response against. + * @param {string} missingJsonFeedback Optional. Custom feedback to give when no JSON is returned. + * @param {string} errorFeedback Optional. Custom feedback prefix to use when schema errors are detected. */ public constructor(schema?: Schema, missingJsonFeedback?: string, errorFeedback?: string) { this.schema = schema; @@ -46,12 +46,12 @@ export class JSONResponseValidator> implements Prom /** * Validates a response to a prompt. - * @param context Context for the current turn of conversation with the user. - * @param memory An interface for accessing state values. - * @param tokenizer Tokenizer to use for encoding and decoding text. - * @param response Response to validate. - * @param remaining_attempts Number of remaining attempts to validate the response. - * @returns A `Validation` object. + * @param {TurnContext} context Context for the current turn of conversation with the user. + * @param {Memory} memory An interface for accessing state values. + * @param {Tokenizer} tokenizer Tokenizer to use for encoding and decoding text. + * @param {PromptResponse} response Response to validate. + * @param {number} remaining_attempts Number of remaining attempts to validate the response. + * @returns {Promise>} A `Validation` object. */ public validateResponse( context: TurnContext, @@ -108,8 +108,8 @@ export class JSONResponseValidator> implements Prom /** * @private - * @param error Error in the JSON object - * @returns How to fix the given error. + * @param {ValidationError} error Error in the JSON object + * @returns {string} How to fix the given error. */ private getErrorFix(error: ValidationError): string { // Get argument as a string diff --git a/js/packages/teams-ai/src/validators/Response.ts b/js/packages/teams-ai/src/validators/Response.ts index 59985c026..95c18d890 100644 --- a/js/packages/teams-ai/src/validators/Response.ts +++ b/js/packages/teams-ai/src/validators/Response.ts @@ -12,8 +12,8 @@ export class Response { /** * Parse all objects from a response string. - * @param text Response text to parse. - * @returns Array of parsed objects. + * @param {string} text Response text to parse. + * @returns {Record[]} Array of parsed objects. */ public static parseAllObjects(text: string): Record[] { // First try parsing each line @@ -42,8 +42,9 @@ export class Response { /** * Fuzzy JSON parser. - * @param text text to parse. - * @returns The parsed object or undefined if the object could not be parsed. + * @template TObject Type of the object to parse. + * @param {string} text text to parse. + * @returns {TObject | undefined} The parsed object or undefined if the object could not be parsed. */ public static parseJSON(text: string): TObject | undefined { const startBrace = text.indexOf('{'); @@ -80,20 +81,22 @@ export class Response { case '[': nesting.push(']'); break; - case '}': + case '}': { const closeObject = nesting.pop(); if (closeObject != '}') { // Malformed return undefined; } break; - case ']': + } + case ']': { const closeArray = nesting.pop(); if (closeArray != ']') { // Malformed return undefined; } break; + } case '<': // The model sometimes fails to wrap with double quotes ch = `"<`; @@ -130,8 +133,8 @@ export class Response { * Removes any empty fields from an object. * @remarks * Empty fields include `null`, `undefined`, `[]`, `{}`, and `""`. - * @param obj The object to clean. - * @returns A cleaned object. + * @param {Record} obj The object to clean. + * @returns {Record} A cleaned object. */ public static removeEmptyValuesFromObject(obj: Record): Record { const result: Record = {}; diff --git a/js/samples/04.ai.a.teamsChefBot/.eslintrc b/js/samples/04.ai.a.teamsChefBot/.eslintrc index 1e5143079..5b21c65b2 100644 --- a/js/samples/04.ai.a.teamsChefBot/.eslintrc +++ b/js/samples/04.ai.a.teamsChefBot/.eslintrc @@ -52,7 +52,13 @@ "no-constant-condition": "off", "no-undef": "off", // Disabled due to conflicts with @typescript/eslint "no-unused-vars": "off", // Disabled due to conflicts with @typescript/eslint - "prettier/prettier": "error" + "prettier/prettier": "error", + "jsdoc/check-tag-names": [ + 1, + { + "definedTags": ["remarks"] // Allow @remarks + } + ] }, "overrides": [ { diff --git a/js/samples/04.ai.a.teamsChefBot/src/VectraDataSource.ts b/js/samples/04.ai.a.teamsChefBot/src/VectraDataSource.ts index 533b1a3a4..2ad54d741 100644 --- a/js/samples/04.ai.a.teamsChefBot/src/VectraDataSource.ts +++ b/js/samples/04.ai.a.teamsChefBot/src/VectraDataSource.ts @@ -69,7 +69,7 @@ export class VectraDataSource implements DataSource { /** * Creates a new `VectraDataSource` instance. - * @param options Options for creating the data source. + * @param {VectraDataSourceOptions} options Options for creating the data source. */ public constructor(options: VectraDataSourceOptions) { this._options = options; @@ -95,10 +95,11 @@ export class VectraDataSource implements DataSource { /** * Renders the data source as a string of text. - * @param context Turn context for the current turn of conversation with the user. - * @param memory An interface for accessing state values. - * @param tokenizer Tokenizer to use when rendering the data source. - * @param maxTokens Maximum number of tokens allowed to be rendered. + * @param {TurnContext} context Turn context for the current turn of conversation with the user. + * @param {Memory} memory An interface for accessing state values. + * @param {Tokenizer} tokenizer Tokenizer to use when rendering the data source. + * @param {number} maxTokens Maximum number of tokens allowed to be rendered. + * @returns {Promise>} A promise that resolves to the rendered data source. */ public async renderData( context: TurnContext, diff --git a/js/samples/04.ai.a.teamsChefBot/src/responseFormatter.ts b/js/samples/04.ai.a.teamsChefBot/src/responseFormatter.ts index 4bba60b27..3c1f85d40 100644 --- a/js/samples/04.ai.a.teamsChefBot/src/responseFormatter.ts +++ b/js/samples/04.ai.a.teamsChefBot/src/responseFormatter.ts @@ -2,7 +2,7 @@ import { Application, AI, PredictedSayCommand } from '@microsoft/teams-ai'; /** * - * @param app + * @param {Application} app Application to add the response formatter to. */ export function addResponseFormatter(app: Application): void { app.ai.action(AI.SayCommandActionName, async (context, state, data) => { diff --git a/js/samples/04.ai.b.messageExtensions.AI-ME/src/index.ts b/js/samples/04.ai.b.messageExtensions.AI-ME/src/index.ts index 4b02f3acf..8d7b0f24e 100644 --- a/js/samples/04.ai.b.messageExtensions.AI-ME/src/index.ts +++ b/js/samples/04.ai.b.messageExtensions.AI-ME/src/index.ts @@ -267,6 +267,6 @@ async function updatePost( } // Return card - const card = createEditView(response.message?.content!, PREVIEW_MODE); + const card = createEditView(response.message!.content!, PREVIEW_MODE); return createTaskInfo(card); } diff --git a/js/samples/04.e.twentyQuestions/src/index.ts b/js/samples/04.e.twentyQuestions/src/index.ts index 9258ecf9e..713c6b55e 100644 --- a/js/samples/04.e.twentyQuestions/src/index.ts +++ b/js/samples/04.e.twentyQuestions/src/index.ts @@ -190,5 +190,5 @@ async function getHint(context: TurnContext, state: ApplicationTurnState): Promi throw result.error!; } - return result.message?.content!; + return result.message!.content!; } diff --git a/js/samples/06.assistants.b.orderBot/src/foodOrderCard.ts b/js/samples/06.assistants.b.orderBot/src/foodOrderCard.ts index e3d1255bd..ff6bb13a9 100644 --- a/js/samples/06.assistants.b.orderBot/src/foodOrderCard.ts +++ b/js/samples/06.assistants.b.orderBot/src/foodOrderCard.ts @@ -2,7 +2,7 @@ import { Order } from './foodOrderViewSchema'; /** * - * @param order + * @param {Order} order Order to generate a card for. */ export function generateCardForOrder(order: Order) { const card: any = { @@ -33,7 +33,7 @@ export function generateCardForOrder(order: Order) { for (const item of order.items) { switch (item.itemType) { - case 'pizza': + case 'pizza': { const name = item.name ? item.name : 'Custom Pizza'; card.body.push({ type: 'TextBlock', @@ -41,6 +41,7 @@ export function generateCardForOrder(order: Order) { wrap: true }); break; + } case 'beer': card.body.push({ type: 'TextBlock', diff --git a/js/yarn.lock b/js/yarn.lock index 72bb1bdb8..c519510df 100644 --- a/js/yarn.lock +++ b/js/yarn.lock @@ -1686,11 +1686,6 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== -ansi-sequence-parser@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz#e0aa1cdcbc8f8bb0b5bca625aac41f5f056973cf" - integrity sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg== - ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -4974,18 +4969,6 @@ handle-thing@^2.0.0: resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== -handlebars@^4.7.7: - version "4.7.8" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" - integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.2" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -5948,11 +5931,6 @@ json5@^2.2.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonc-parser@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" - integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -6300,11 +6278,6 @@ lru-cache@^7.14.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.1.tgz#0a3be479df549cca0e5d693ac402ff19537a6b7a" integrity sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g== -lunr@^2.3.9: - version "2.3.9" - resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" - integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== - magic-string@^0.23.2: version "0.23.2" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.23.2.tgz#204d7c3ea36c7d940209fcc54c39b9f243f13369" @@ -6373,11 +6346,6 @@ markdown-it@^12.2.0: mdurl "^1.0.1" uc.micro "^1.0.5" -marked@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" - integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== - md5.js@^1.3.4: version "1.3.5" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" @@ -6516,7 +6484,7 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@9.0.3, minimatch@^9.0.1, minimatch@^9.0.3: +minimatch@9.0.3, minimatch@^9.0.1: version "9.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== @@ -6788,11 +6756,6 @@ negotiator@^0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - next-tick@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" @@ -8287,16 +8250,6 @@ shelljs@^0.8.5: interpret "^1.0.0" rechoir "^0.6.2" -shiki@^0.14.7: - version "0.14.7" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.7.tgz#c3c9e1853e9737845f1d2ef81b31bcfb07056d4e" - integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg== - dependencies: - ansi-sequence-parser "^1.1.0" - jsonc-parser "^3.2.0" - vscode-oniguruma "^1.7.0" - vscode-textmate "^8.0.0" - shimmer@^1.1.0, shimmer@^1.2.0, shimmer@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" @@ -9334,23 +9287,6 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typedoc-plugin-markdown@^3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.17.1.tgz#c33f42363c185adf842f4699166015f7fe0ed02b" - integrity sha512-QzdU3fj0Kzw2XSdoL15ExLASt2WPqD7FbLeaqwT70+XjKyTshBnUlQA5nNREO1C2P8Uen0CDjsBLMsCQ+zd0lw== - dependencies: - handlebars "^4.7.7" - -typedoc@^0.25.7: - version "0.25.7" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.7.tgz#11e3f527ca80ca3c029cb8e15f362e6d9f715e25" - integrity sha512-m6A6JjQRg39p2ZVRIN3NKXgrN8vzlHhOS+r9ymUYtcUP/TIQPvWSq7YgE5ZjASfv5Vd5BW5xrir6Gm2XNNcOow== - dependencies: - lunr "^2.3.9" - marked "^4.3.0" - minimatch "^9.0.3" - shiki "^0.14.7" - typescript@5.3.3, typescript@^5.3.3: version "5.3.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" @@ -9361,11 +9297,6 @@ uc.micro@^1.0.1, uc.micro@^1.0.5: resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== -uglify-js@^3.1.4: - version "3.17.4" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" - integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== - umd@^3.0.0, umd@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.3.tgz#aa9fe653c42b9097678489c01000acb69f0b26cf" @@ -9614,16 +9545,6 @@ vm-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== -vscode-oniguruma@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" - integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== - -vscode-textmate@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" - integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== - wbuf@^1.1.0, wbuf@^1.7.3: version "1.7.3" resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" @@ -9718,11 +9639,6 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== - workerpool@6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"