microsoft / teams-ai

SDK focused on building AI based applications and extensions for Microsoft Teams and other Bot Framework channels
MIT License
406 stars 176 forks source link

[Dev support]: AI Actions #1640

Closed PatelN123 closed 3 months ago

PatelN123 commented 4 months ago

Hey -

When using AI Actions, I can make it call the action fine, but how do I feed the response back into the AI to create an answer?

Example:

User: Help me with ticket number X Assistant calls action to get details Details are fed back into AI and helps with a solution, then sends the answer.

I've currently got the below code by looking at samples but it doesn't operate how I would like.

app.ai.action<GetTicketDetailsParams>('GetTicketDetails', async (context, state, params) => {
    await context.sendActivity('Retrieving ticket info...');
    // Logic to retrieve ticket info via API
    return 'Ticket Info.';
});

Can someone support with how to achieve this please?

PatelN123 commented 4 months ago

@corinagum @lilyydu - Can you guys support here?

corinagum commented 4 months ago

Please see the list bot sample. https://github.com/microsoft/teams-ai/blob/main/js/samples/03.ai-concepts/d.chainedActions-listBot/src/index.ts#L149

PatelN123 commented 4 months ago

Thank you @corinagum.

I did try the do action option but this isn't working how I need.

I need to feed the AI the details of the ticket (eg, summary, explanation of the issue) and the AI will look at that and make a reply and suggest resolutions on its own.

Do you understand the use case?

With OpenAI Assistants, you add a function, when the function is called, you reply to it with the output (summary, explanation of the issue) and it automatically does the above. How do I do this with Teams-AI?

corinagum commented 4 months ago

Could you share the following?

  1. The doAction that you tried that didn't work
  2. The route selector or function for the action you are trying to call
  3. Assistants planner code as applicable
corinagum commented 4 months ago

@PatelN123 FYI there is limited function support. Tools support for assistants is on our immediate roadmap.

PatelN123 commented 4 months ago

Ah okay. So is my described functionality available at this time?

Do you have a sample that uses the functionality I describe?