olivia icon indicating copy to clipboard operation
olivia copied to clipboard

Dont Require Locally Available Olivia Repository To Use Olivia Or Allow Custom Paths

Open bonedaddy opened this issue 5 years ago • 1 comments

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/locales folder 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 CreateNeuralNetwork configurable
  • Embed the assets into the olivia repositry itself via something like go-bindata

bonedaddy avatar Jun 19 '20 02:06 bonedaddy

That is because Olivia isn’t a library, it isn’t built for third-party usage.

hugolgst avatar Jun 19 '20 06:06 hugolgst