Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: textReplyToSend Value cannot be null #1186

Closed
singhk97 opened this issue Jan 20, 2024 · 1 comment · Fixed by #1230
Closed

[Bug]: textReplyToSend Value cannot be null #1186

singhk97 opened this issue Jan 20, 2024 · 1 comment · Fixed by #1230
Assignees
Labels
bug Something isn't working dotnet Change/fix applies to dotnet. If all three, use the 'JS & dotnet & Python' label

Comments

@singhk97
Copy link
Collaborator

singhk97 commented Jan 20, 2024

Language

C#

Version

latest

Description

When using the light bot I see this error message:

image

The message I sent was return a json object but do NOT include a response property in it

Stack Trace:

fail: Microsoft.Teams.AI.TeamsAdapter[0]
      [OnTurnError] unhandled error : Value cannot be null. (Parameter 'textReplyToSend')
      System.ArgumentNullException: Value cannot be null. (Parameter 'textReplyToSend')
         at Microsoft.Bot.Builder.TurnContext.SendActivityAsync(String textReplyToSend, String speak, String inputHint, CancellationToken cancellationToken)
         at Microsoft.Teams.AI.AI.Action.DefaultActions`1.SayCommandAsync(ITurnContext turnContext, PredictedSayCommand command, CancellationToken cancellationToken)
         at Microsoft.Teams.AI.AI.Action.ActionHandler`1.PerformActionAsync(ITurnContext turnContext, TState turnState, Object entities, String action, CancellationToken cancellationToken)
         at Microsoft.Teams.AI.AI.AI`1.RunAsync(ITurnContext turnContext, TState turnState, Nullable`1 startTime, Int32 stepCount, CancellationToken cancellationToken)
         at Microsoft.Teams.AI.Application`1._OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken)
         at Microsoft.Teams.AI.Application`1.OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.MiddlewareSet.ReceiveActivityWithStatusAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken)
         at Microsoft.Bot.Builder.BotAdapter.RunPipelineAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken)

Reproduction Steps

  1. Run the C# Light Bot sample with an OpenAI key. The model is gpt-3.5-turbo
  2. Send "return a json object but do NOT include a \u0022response\u0022 property in it"" to the bot
  3. The bot should through that error.

Expected Behavior

Since the say command's response property is missing, nothing should be sent to the bot.

@singhk97 singhk97 added bug Something isn't working dotnet Change/fix applies to dotnet. If all three, use the 'JS & dotnet & Python' label labels Jan 20, 2024
@aacebo aacebo self-assigned this Jan 25, 2024
@aacebo
Copy link
Collaborator

aacebo commented Jan 29, 2024

@singhk97 can you add a section on Expected Behavior please?

aacebo added a commit that referenced this issue Feb 1, 2024
## Linked issues

closes: #1186 

## Details

- on default say command ensure response is present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dotnet Change/fix applies to dotnet. If all three, use the 'JS & dotnet & Python' label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants