microsoft / microsoft/BotFramework-WebChat
Facing problem implementing streaming using directline channel
Open
Nobody has claimed this yet.
Bot Services
customer-reported
question
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 1.6k
- Avg merge
- 22h 58m
- Merged PRs (30d)
- 2
Description
I have a question
Hello All,
i tried implementing the solution using the below code please let me know what I'm doing it wrong.
i have followed instruction from this file
LIVESTREAMING.md
else if (turnContext.Activity.ChannelId.Equals(Channels.Directline))
{
var oldActivity = new Bot.Schema.Activity();
oldActivity.Type = "typing";
oldActivity.Text = "Searching your document library...";
oldActivity.ChannelData = new ChannelData()
{
streamSequence = 1,
streamType = "informative"
};
var activityid = await turnContext.SendActivityAsync(oldActivity);
Thread.Sleep(1000);
oldActivity.Type = "typing";
oldActivity.Text = "A quick";
oldActivity.ChannelData = new ChannelData()
{
streamId = activityid.Id,
streamSequence = 2,
streamType = "streaming"
};
await turnContext.SendActivityAsync(oldActivity);
Thread.Sleep(1000);
oldActivity.Type = "typing";
oldActivity.Text = "A quick brown fox";
oldActivity.ChannelData = new ChannelData()
{
streamId = activityid.Id,
streamSequence = 3,
streamType = "streaming"
};
await turnContext.SendActivityAsync(oldActivity);
Thread.Sleep(1000);
oldActivity.Type = "message";
oldActivity.Text = "A quick brown fox jumped over the lazy dogs.";
oldActivity.ChannelData = new ChannelData() { streamId = activityid.Id, streamType = "final" };
await turnContext.SendActivityAsync(oldActivity);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docs/LIVESTREAMING.md at the bot-implementation section and compare its Direct Line requirements with the activity sequence in the issue. Reproduce the reported behavior using the provided C# example and capture the actual result or error. Done means identifying a specific defect with a reproducible case, or confirming the implementation streams successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100