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

Added article: SignalR with Open AI #33448

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

kevinguo-ed
Copy link

@kevinguo-ed kevinguo-ed commented Aug 27, 2024

Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this content really works as a tutorial. This is more an explanation of the sample project. Can you move this down to the Samples section?

Copy link
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits

chatMessages.Add(new AssistantChatMessage(message));
}
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should consider having some text to describe the following bit of code, or perhaps the preceding bits. As it stands now, two new code blocks without interleaving text makes it difficult to understand what exactly is being discussed in each. Also, comments in code are not localized, something to be aware of (it's better to have that in the article around the code).

Copy link
Contributor

@Rick-Anderson Rick-Anderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this looks like a really great article. It just needs a little work and we can help you make the changes.

We use OpenAI for generating intelligent, context-aware responses and SignalR for delivering the response to users in a group. You can find the complete code [in this repo](https://github.com/microsoft/SignalR-Samples-AI/tree/main/AIStreaming).

## Dependencies
You can use either Azure OpenAI or OpenAI for this project. Make sure to update the `endpoint` and `key` in `appsetting.json`. `OpenAIExtensions` reads the configuration when the app starts and they are required to authenticate and use either service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be

Update the endpoint and key in appsetting.json file as shown in the following code:

After this PR merges, we can move the code to a sample folder and display the appsetting.json with the changes highlighted.

@kevinguo-ed
Copy link
Author

@kevinguo-ed please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree company="Microsoft"

@wadepickett
Copy link
Contributor

wadepickett commented Oct 7, 2024

I don't think this content really works as a tutorial. This is more an explanation of the sample project. Can you move this down to the Samples section?

I agree with both of Mike's points above.

@BrennanConroy
This looks like the sample itself from https://github.com/microsoft/SignalR-Samples-AI/tree/main/AIStreaming would be a candidate to go here with the existing SignalR samples:
https://github.com/aspnet/SignalR-samples

Then per Mike's point above, the content for that sample in this PR here (after another edit round which I will help with) would go in a README for the sample. It is more of a description of the sample, rather than a tutorial.

Thoughts?

@wadepickett
Copy link
Contributor

@BrennanConroy, thoughts? See suggestion above.

@wadepickett
Copy link
Contributor

I don't think this content really works as a tutorial. This is more an explanation of the sample project. Can you move this down to the Samples section?

(I've been assigned to finish this up.)

Thanks @mikekistler , you mentioned moving this down to the "Samples section"

I assume you meant moving it down in the TOC menu to "Real-time apps > Samples "

image

...that points directly to the sample repo here.
https://github.com/aspnet/SignalR-samples

Were you thinking the content in this PR should move to the SignalR-samples repo, or were you envisioning sub links under the Real-time apps > Samples TOC? If the latter, then I will create two sub items to "Samples" in the TOC, one for the samples repo (and make it more clear that is where it points to) and another for this topic.

Also,
The code sample for the doc in the PR is located here:
https://github.com/microsoft/SignalR-Samples-AI/tree/main/AIStreaming

It is not clear to me if the intent was that the samples code for this topic stays in that repo. I'm unaware of the history on that. I'll assume it does rather than moving it to the sample to the SignalR-samples repo unless I hear otherwise.

Thanks for any clarification.

@mikekistler
Copy link
Contributor

Moving this to the SignalR-samples repo was what I had in mind, but sadly that repo is archived now, so we probably need some other solution. I don't have any strong opinion on this -- only that we should differentiate tutorials and samples for the benefit of users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants