Forum Discussion
Janhvi
May 08, 2024Copper Contributor
Tools in Teams AI Library
Hello Team, In LLM we use tools like DynamicTool, DynamicStructuredTool to determine when to call which function and with what parameters. How to do the same using Teams AI Library? My Use Case...
Janhvi
May 14, 2024Copper Contributor
Hello Vaibhav-MSFT
The code line
const subactionName = context.activity.value?.subaction;
that you mentioned in the above code, doesn't work as context.activity.value is undefined
I checked it with the latest version as well.
Also where will I find the above reference code?
The code line
const subactionName = context.activity.value?.subaction;
that you mentioned in the above code, doesn't work as context.activity.value is undefined
I checked it with the latest version as well.
Also where will I find the above reference code?
Vaibhav-MSFT
Microsoft
May 15, 2024Hi Janhvi,
The context.activity.value "undefined" indicates that activity received by the bot does not contain a value property.
Can you add a check before for handling this-
// Check if context.activity.value exists and has a subaction property
if (context.activity.value && context.activity.value.subaction)
{
subactionName = context.activity.value.subaction;
}
- JanhviMay 15, 2024Copper ContributorHello Vaibhav-MSFT
context.activity.value does not exist.
Hence it will never be able to perform the function provided for any subaction- Vaibhav-MSFTMay 16, 2024
Microsoft
Janhvi ,
We are in conversation with engineering team and will update you once we get more information on this.- JanhviMay 17, 2024Copper ContributorVaibhav-MSFT
Sure, Thank you!
Also meanwhile can you please provide link for resources for Team AI library apart from the below two links:
https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/teams%20conversational%20ai/teams-conversation-ai-overview
https://github.com/microsoft/teams-ai/tree/main/js/samples/