-
Notifications
You must be signed in to change notification settings - Fork 342
Add ASP.NET Core example and update README #499
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
Conversation
|
Thanks for your contribution, @claudiogodoy99, and your interest in improving the OpenAI developer experience. We'll take a look and see if we can get this merged in! |
|
@scottaddie, @achandmsft: Would appreciate your thoughts on sample content and docs organization. |
Co-authored-by: Jesse Squire <[email protected]>
Co-authored-by: Jesse Squire <[email protected]>
|
hey @jsquire, thanks for reviewing, I've made some commits addressing the comments. |
jsquire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @claudiogodoy99! A couple of minor nits, and I think we're good to merge.
Co-authored-by: Jesse Squire <[email protected]>
Co-authored-by: Jesse Squire <[email protected]>
jsquire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thansk, @claudiogodoy99! I'll get this merged in.
|
Hrmm... seeing a compile error in the pipeline. Unsure if we're missing some usings or the CI environment is misbehaving. Error: /home/runner/work/openai-dotnet/openai-dotnet/examples/aspnet-core/Program.cs(47,18): error CS0246: The type or namespace name 'Task<>' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/openai-dotnet/openai-dotnet/examples/OpenAI.Examples.csproj]
Error: /home/runner/work/openai-dotnet/openai-dotnet/examples/aspnet-core/Program.cs(38,22): error CS0246: The type or namespace name 'ILogger<>' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/openai-dotnet/openai-dotnet/examples/OpenAI.Examples.csproj]
Error: /home/runner/work/openai-dotnet/openai-dotnet/examples/aspnet-core/Program.cs(41,47): error CS0246: The type or namespace name 'ILogger<>' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/openai-dotnet/openai-dotnet/examples/OpenAI.Examples.csproj]I'll need to pull this down locally and investigate. |
|
@jsquire I solve the CI issue, the problem is that the To solve it I removed the |
Thanks! You got there before I was able to loop back. |
|
Thank you, again, @claudiogodoy99! |
Hi team,
This PR adds a concrete example showing how to properly register and use the OpenAIClient with dependency injection in an ASP.NET Core application. It also includes a short highlighted section in the main README.md under the heading "How to use dependency injection".
PR for issue #498