Dont Require Locally Available Olivia Repository To Use Olivia Or Allow Custom Paths
The olivia library is pretty cool, however there is a major downside which is that you need to have a a copy of the olivia repository available locally. For example when initializing the bot, and running `CreateNeuralNetwork.
The first line in this function is:
// Decide if the network is created by the save or is a new one
saveFile := "res/locales/" + locale + "/training.json"
which means that in order to use olivia, you have to either:
- a) Copy the
res/localesfolder to the current working directory of the CLI or third-party app being used. - b) Run the CLI or third-party app from within the olivia repo itself.
Additionally this means that if you have a third-party app using olivia, any updates to olivia itself would require reshipping the res/locales folder to whatever server is running the third-party app. While this is certainly doable, it is not without its frustrations and makes using olivia from third-party apps a lot more difficult then it should be.
A few suggestions that would make integrating olivia with third-party apps, and even just using the CLI astronomically easier:
- Dont use hard-coded paths, and make all paths required by functions such as
CreateNeuralNetworkconfigurable - Embed the assets into the olivia repositry itself via something like
go-bindata
That is because Olivia isn’t a library, it isn’t built for third-party usage.