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

Merge JD's docs #147

Merged
merged 20 commits into from
Dec 9, 2024
Merged

Merge JD's docs #147

merged 20 commits into from
Dec 9, 2024

Conversation

awaescher
Copy link
Owner

@awaescher awaescher commented Nov 25, 2024

Note

This is the awesome work of @JerrettDavis

As mentioned in #113, it would be nice to have some sort of auto-generated documentation site for the library's API.

I updated some of the in-code documentation and created a Demo Site.

While reviewing the generated site, I altered the visibility of several classes to be internal. They appeared to largely be internal constructs only used by the OllamaSharp library itself.


Document Site

Demo Site Home Page:
image

Demo Site - Custom Docs
imageimage

Demo Site - Auto Generated API Docs
image
image


The documentation is being generated using docfx. It is highly configurable, and should meet a wide variety of use cases. I've done around the minimum amount of configuration necessary to get it up and running. I did add a plugin to make handing layouts a bit easier, and with that, I also added some CSS styles to help create more sophisticated layouts.

I wasn't sure what to use for the icon, and I didn't want to create confusion by using the official Ollama logo throughout. I created a simple, silly .NETish themed Ollama logo derivative. Please feel free to replace this with whatever appropriate branding you deem fit. I wanted to make sure it wasn't the default.


Class Access Modifiers

To minimize the scope of the documentation, I went through and adjusted several classes to have different access modifiers. I reduced their scope from public down to internal. The modified classes should be audited, and if they shouldn't be internal, it would be useful to add documentation around how one could extend those pieces of the library.


Documentation

I updated documentation throughout the library. In most of the places, the changes were limited to: adding documentation for return types, adding <see ref=""> and <see href=""> to relevant documentation, adding example code snippets, and clarifying verbiage.

Nullable Annotations

I noted several places where null-checking, null-asserting, or null reference type usage was inconsistent. In these locations, I changed the null-annotations by adding or removing a ! or ? to the affected code. In at least one area, I added a more explicit exception where a null could be passed into an area where one is not permitted.

@awaescher awaescher marked this pull request as ready for review December 9, 2024 07:58
@awaescher awaescher merged commit c6c6f98 into main Dec 9, 2024
1 check passed
@awaescher awaescher deleted the docs branch December 9, 2024 08:04
@awaescher
Copy link
Owner Author

JD, the merge is finally done (sorry it took so long) and the api docs are on GitHub pages

Awesome work once again, thanks a thousand times for your help!

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