diff --git a/docs/docs/apis-generate/generate.md b/docs/docs/apis-generate/generate.md index 6d1cf66..aed106e 100644 --- a/docs/docs/apis-generate/generate.md +++ b/docs/docs/apis-generate/generate.md @@ -11,7 +11,7 @@ the [completion](https://github.com/jmorganca/ollama/blob/main/docs/api.md#gener Use the `OptionBuilder` to build the `Options` object with [extra parameters](https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values). Refer -to [this](/docs/apis-extras/options-builder). +to [this](/apis-extras/options-builder). ## Try asking a question about the model. @@ -53,25 +53,26 @@ public class Main { OllamaAPI ollamaAPI = new OllamaAPI(host); // define a stream handler (Consumer) OllamaStreamHandler streamHandler = (s) -> { - System.out.println(s); + System.out.println(s); }; // Should be called using seperate thread to gain non blocking streaming effect. OllamaResult result = ollamaAPI.generate(config.getModel(), - "What is the capital of France? And what's France's connection with Mona Lisa?", - new OptionsBuilder().build(), streamHandler); - - System.out.println("Full response: " +result.getResponse()); + "What is the capital of France? And what's France's connection with Mona Lisa?", + new OptionsBuilder().build(), streamHandler); + + System.out.println("Full response: " + result.getResponse()); } } ``` + You will get a response similar to: > The > The capital > The capital of > The capital of France -> The capital of France is +> The capital of France is > The capital of France is Paris > The capital of France is Paris. > Full response: The capital of France is Paris. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index eac9357..cc19285 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -40,6 +40,8 @@ const config = { /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { + path: 'docs', + routeBasePath: '', // change this to any URL route you'd want. For example: `home` - if you want /home/intro. sidebarPath: './sidebars.js', // Please change this to your repo. // Remove this to remove the "edit this page" links.