Refactor the server host application in its own assembly - #197
Merged
Conversation
Owner
|
@vvdb-architecture Thank you so much for these refactoring. It looks more organizated now. This changed has been merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is the spiritual continuation of #196.
TensorSharp.Serverand puts it into a new assemblyTensorSharp.Server.Host.TensorSharp.Serverpublic so that these types can be referenced both inTensorSharp.Server.Hostand in existing hosts which wants to integrate TensorSharp.All tests run, and
TensorSharp.Server.Hostruns as well.The documentation has been updated: references to running
TensorSharp.Serverwere changed appropriately intoTensorSharp.Server.Host. Please note that the documentation in Chinese was updated as well, but I don't speak the language: I just changed the references toTensorSharp.Server. I've been careful, but perhaps this should be reviewed carefully.Future PRs may decide to expose more types in the
TensorSharp.Serverassembly for additional flexibility, but at this point in time it's too soon to tell.Postscriptum: for folks like me who like to work in Visual Studio and press F5 in Debug mode to find out how things work, it's interesting to add a
launchsettings.jsoncontaining the following:{ "profiles": { "TensorSharp.Server.Host": { "commandName": "Project", "commandLineArgs": "--model F:\\models\\gemma-4-E4B-it-Q8_0.gguf --backend cuda", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, "applicationUrl": "http://localhost:5000" } } }...where
commandLineArgsis obviously tailored to your needs. This will allow you to single step through the code and learn a bit better how everything fits together.Perhaps this could be written down somewhere in a
README.mdfile somewhere.