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 3 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).

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
Member

Choose a reason for hiding this comment

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

Suggested change
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.
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
Collaborator

@guardrex guardrex Sep 17, 2024

Choose a reason for hiding this comment

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

We code fence all file names and paths on this repo, so you're good on this repo with that @kevinguo-ed.

However, the file name is plural ... appsettings.json. Also, there's a missing comma. I also recommend dropping the pronoun "they" in favor of referring to the config keys.

Suggested change
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.
You can use either Azure OpenAI or OpenAI for this project. Make sure to update the `endpoint` and `key` in `appsettings.json`. `OpenAIExtensions` reads the configuration when the app starts, and the configuration values for `endpoint` and `key` are required to authenticate and use either service.

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.

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