forked from Mirror/ollama4j
Updated base route of docs
This commit is contained in:
parent
a10692e2f1
commit
9224d2da06
@ -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,18 +53,19 @@ public class Main {
|
||||
OllamaAPI ollamaAPI = new OllamaAPI(host);
|
||||
// define a stream handler (Consumer<String>)
|
||||
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);
|
||||
"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());
|
||||
System.out.println("Full response: " + result.getResponse());
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You will get a response similar to:
|
||||
|
||||
> The
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user