Quellcode durchsuchen

Add the constructor to the readme.

saul vor 1 Jahr
Ursprung
Commit
efbb349a68
1 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen
  1. 12 0
      README.md

+ 12 - 0
README.md

@@ -6,6 +6,7 @@ Interface with an ollama instance over HTTP.
 - [Install](#install)
 - [Usage](#usage)
 - [API](#api)
+  - [Ollama](#Ollama)
   - [generate](#generate)
   - [create](#create)
   - [tags](#tags)
@@ -38,6 +39,17 @@ for await (const token of ollama.generate("llama2", "What is a llama?")) {
 
 The API aims to mirror the [HTTP API for Ollama](https://github.com/jmorganca/ollama/blob/main/docs/api.md).
 
+### Ollama
+
+```javascript
+new Ollama(config);
+```
+
+- `config` `<Object>` The configuration object for Ollama.
+  - `address` `<string>` The Ollama API address. Default: `"http://localhost:11434"`.
+
+Create a new API handler for ollama.
+
 ### generate
 
 ```javascript