@microsoft/teams-ai package
Classes
AssistantsPlanner |
A Planner that uses the OpenAI Assistants API. |
AI |
AI System. |
ActionAugmentationSection |
A prompt section that renders a list of actions to the prompt. |
ActionOutputMessage |
A section capable of rendering user input text and images as a user message. |
ActionPlanner |
A planner that uses a Large Language Model (LLM) to generate plans. |
ActionResponseValidator |
Validates action calls returned by the model. |
AdaptiveCards |
AdaptiveCards class to enable fluent style registration of handlers related to Adaptive Cards. |
Application |
Application class for routing and processing incoming requests. |
ApplicationBuilder |
A builder class for simplifying the creation of an Application instance. |
AssistantMessage |
A message sent by the assistant. |
AuthError |
An error thrown when an authentication error occurs. |
Authentication |
User authentication service. |
AuthenticationManager |
The user authentication manager. |
AzureContentSafetyModerator |
An Azure OpenAI moderator that uses OpenAI's moderation API to review prompts and plans for safety. |
ConversationHistory |
A section that renders the conversation history. |
DataSourceSection |
A section that renders a data source to a prompt. |
DefaultAugmentation |
The default 'none' augmentation. |
DefaultModerator |
Default moderator created by the AI system if one isn't configured. |
DefaultResponseValidator |
Default response validator that always returns true. |
FunctionCallMessage |
An |
FunctionResponseMessage |
Message containing the response to a function call. |
GPT3Tokenizer |
Tokenizer that uses GPT-3's encoder. |
GPTTokenizer |
Tokenizer that uses GPT's cl100k_base encoding. To use GPT-3 encoding, pass in an instance of GPT3Tokenizer. |
GroupSection |
A group of sections that will rendered as a single message. |
JSONResponseValidator |
Parses any JSON returned by the model and optionally verifies it against a JSON schema. |
LLMClient |
LLMClient class that's used to complete prompts. |
LayoutEngine |
Base layout engine that renders a set of |
LlamaModel |
An AI model that can be used to complete prompts. |
MemoryFork |
Forks an existing memory. |
MessageExtensions |
MessageExtensions class to enable fluent style registration of handlers related to Message Extensions. |
MonologueAugmentation |
The 'monologue' augmentation. |
OpenAIEmbeddings |
A |
OpenAIModel |
A |
OpenAIModerator |
A moderator that uses OpenAI's moderation API to review prompts and plans for safety. |
Prompt |
Top level prompt section. |
PromptManager |
A filesystem based prompt manager. |
PromptSectionBase |
Abstract Base class for most prompt sections. |
SequenceAugmentation |
The 'sequence' augmentation. |
StreamingResponse |
A helper class for streaming responses to the client. |
SystemMessage |
A system message. |
TaskModules |
TaskModules class to enable fluent style registration of handlers related to Task Modules. |
TeamsAdapter |
An adapter that implements the Bot Framework Protocol and can be hosted in different cloud environments both public and private. |
TeamsAttachmentDownloader |
Downloads attachments from Teams using the bots access token. |
TemplateSection |
A template section that will be rendered as a message. |
TestModel |
A |
TextDataSource |
A data source that can be used to add a static block of text to a prompt. |
TextSection |
A section of text that will be rendered as a message. |
ToolsAugmentation |
The 'tools' augmentation is for enabling server-side action/tools calling. In the Teams AI Library, the equivalent to OpenAI's 'tools' functionality is called an 'action'. More information about OpenAI's tools can be found at OpenAI API docs. Therefore, tools/actions are defined in |
TurnState |
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. |
TurnStateEntry |
Accessor class for managing an individual state scope. |
UserInputMessage |
A section capable of rendering user input text and images as a user message. |
UserMessage |
A user message. |
Utilities |
Utility functions for manipulating . |
Interfaces
AssistantsPlannerOptions |
Options for configuring the AssistantsPlanner. |
AIOptions |
Options for configuring the AI system. |
ActionPlannerOptions |
Options used to configure an |
AdaptiveCard |
Strongly typed Adaptive Card. |
AdaptiveCardSearchResult |
Individual result returned from AdaptiveCards.search() handler. |
AdaptiveCardsOptions |
Options for AdaptiveCards class. |
AdaptiveCardsSearchParams |
Parameters passed to AdaptiveCards.search() handler. |
ApplicationOptions |
Options for the Application class. |
Augmentation |
An augmentation is a component that can be added to a prompt template to add additional functionality to the prompt. |
AugmentationConfig |
Interface for the augmentation configuration portion of a prompt template. |
AuthenticationOptions |
The options to configure the authentication manager |
AuthenticatorResult | |
AzureOpenAIEmbeddingsOptions |
Options for configuring an |
AzureOpenAIModelOptions |
Options for configuring an |
AzureOpenAIModeratorOptions |
Options for the OpenAI based moderator. |
BaseOpenAIEmbeddingsOptions |
Base model options common to both OpenAI and Azure OpenAI services. |
BaseOpenAIModelOptions |
Base model options common to both OpenAI and Azure OpenAI services. |
ChatCompletionAction |
An action that can be called by an LLM. |
Citation |
Citations returned by the model. |
ConfiguredAIOptions |
The configured options for the AI system after all defaults have been applied. |
ConfiguredLLMClientOptions |
The configuration of the LLMClient instance. |
ConfiguredPromptManagerOptions |
The configured PromptManager options. |
DataSource |
A data source that can be used to render text that's added to a prompt. |
DefaultConversationState |
Default conversation state |
DefaultTempState |
Default temp state |
DefaultUserState |
Default user state |
FeedbackLoopData |
Data returned when the thumbsup or thumbsdown button is clicked and response sent when enable_feedback_loop is set to true in the AI Module. |
FunctionCall |
A named function to call. |
ImageContentPart | |
InputFile |
A file sent by the user to the bot. |
InputFileDownloader |
A plugin responsible for downloading files relative to the current user's input. |
LLMClientOptions |
Options for an LLMClient instance. |
LlamaModelOptions | |
Memory |
Represents a memory. |
Message |
A message object sent to or received from an LLM. |
MessageContext | |
Moderator |
A moderator is responsible for reviewing and approving AI prompts and plans. |
OpenAIEmbeddingsOptions |
Options for configuring an |
OpenAILikeEmbeddingsOptions |
Options for configuring an embeddings object that calls an |
OpenAIModelOptions |
Options for configuring an |
OpenAIModeratorOptions |
Options for the OpenAI based moderator. |
Plan |
A plan is a set of commands that the AI system will execute. |
Planner |
A planner is responsible for generating a plan that the AI system will execute. |
PredictedCommand |
A predicted command is a command that the AI system should execute. |
PredictedDoCommand |
A predicted DO command is an action that the AI system should perform. |
PredictedDoCommandAndHandler |
Entities argument passed to the action handler for AI.DoCommandActionName. |
PredictedSayCommand |
A predicted SAY command is a response that the AI system should say. |
PromptChunk |
Streaming chunk passed in the |
PromptCompletionModel |
An AI model that can be used to complete prompts. |
PromptCompletionModelEvents |
Events emitted by a PromptCompletionModel. |
PromptFunctions |
A collection of functions that can be called from a prompt template string. |
PromptManagerOptions |
Options used to configure the prompt manager. |
PromptResponseValidator |
A validator that can be used to validate prompt responses. |
PromptSection |
A section that can be rendered to a prompt as either text or an array of |
PromptTemplate |
Prompt template cached by the prompt manager. |
PromptTemplateConfig |
Serialized prompt template configuration. |
Query |
Query arguments for a search-based message extension. |
RenderedPromptSection |
The result of rendering a section. |
TaskModulesOptions |
Options for TaskModules class. |
TeamsAttachmentDownloaderOptions |
Options for the |
TextContentPart | |
Tokenizer |
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. |
TypeRecord | |
ValidatedChatCompletionAction |
A validated action call. |
Validation |
Response returned by a |
Type Aliases
ActionHandler |
The code to execute when the action's name is triggered. |
ActionPlannerPromptFactory |
Factory function used to create a prompt template. |
AuthErrorReason |
Cause of an authentication error. |
ConversationUpdateEvents |
Conversation update events. |
EEMethodReturnType | |
EmitEventNames | |
EventNames | |
InnerEEMethodReturnType | |
ListenerType | |
MatchingKeys | |
MessageContentParts | |
MessageReactionEvents |
Message reaction event types. |
NoUndefined | |
OAuthSettings |
Settings used to configure user authentication through the OAuthPrompt. |
OnEventNames | |
OverriddenKeys | |
OverriddenMethods | |
PromptCompletionModelBeforeCompletionEvent |
Type signature for the |
PromptCompletionModelChunkReceivedEvent |
Type signature for the |
PromptCompletionModelEmitter |
Helper type that strongly types the the EventEmitter for a PromptCOmpletionModel instance. |
PromptCompletionModelResponseReceivedEvent |
Type signature for the |
PromptFunction |
A function that can be called from a prompt template string. |
ReturnTypeOfMethod | |
ReturnTypeOfMethodIfExists | |
RouteHandler |
Function for handling an incoming request. |
RouteSelector |
Function for selecting whether a route handler should be triggered. |
Selector |
A selector function for matching incoming activities. |
SignInResponse |
The sign in response. |
SignInStatus |
The sign in status. |
StrictBroadcast | |
StrictEventEmitter | |
TeamsMessageEvents |
Message related events. |
TurnEvents |
Turn event types. |
VoidKeys |
Enums
AdaptiveCardActionExecuteResponseType | |
MessageExtensionsInvokeNames |
Names of the invoke activities for Message Extensions. |
ModerationSeverity |
The moderation severity level. |
TaskModuleInvokeNames |