microsoft / teams-ai

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

[Bug]: GetNickName code is not correct #1806

Closed chenxizhang closed 3 months ago

chenxizhang commented 3 months ago

Language

Javascript/Typescript

Version

latest

Description

This is an issue of the code sample in the default template, In both JS and Python template.

image

Reproduction Steps

Create a new teams app by using the default template (Custom Copilot => AI Agent) and check the code in `src\app\app.ts`.

export async function getNickname(
  context: TurnContext,
  state: TurnState,
  parameters: NicknameParameters
): Promise<string> {
  const nicknames = {
    "San Francisco": "The Golden City",
    "Los Angeles": "LA",
  };

  return nicknames[parameters.location] ?? `No nickname for ${parameters.location} found`;
}
corinagum commented 3 months ago

Hi @chenxizhang, it looks like you are using a template from https://github.com/OfficeDev/Teams-Toolkit-Samples. We don't manage those samples. Please file your bug there :)