Skip to content

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

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

Conversation

claudiogodoy99
Copy link

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

@jsquire
Copy link
Collaborator

jsquire commented Jul 2, 2025

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!

@jsquire
Copy link
Collaborator

jsquire commented Jul 2, 2025

@scottaddie, @achandmsft: Would appreciate your thoughts on sample content and docs organization.

@jsquire jsquire self-requested a review July 2, 2025 00:35
@claudiogodoy99
Copy link
Author

hey @jsquire, thanks for reviewing, I've made some commits addressing the comments.

Copy link
Collaborator

@jsquire jsquire left a 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.

Comment on lines +11 to +15
<<<<<<< HEAD
"Model": "gpt-4.1-mini",
=======
"Model": "gpt-4.1",
>>>>>>> 2ef2c53 (chore: remove api secret and unused records)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<<<<<<< HEAD
"Model": "gpt-4.1-mini",
=======
"Model": "gpt-4.1",
>>>>>>> 2ef2c53 (chore: remove api secret and unused records)
"Model": "gpt-4.1-mini",

Looks like some conflict markers got left in. I believe the latest change was to move to mini.

</PropertyGroup>

<ItemGroup>
<PackageReference Include="OpenAI" Version="2.1.0" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<PackageReference Include="OpenAI" Version="2.1.0" />
<PackageReference Include="OpenAI" Version="2.2.0" />

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.

2 participants