Forráskód Böngészése

Updating documentation about aborting a streamed response (#139)

Florent Genette 10 hónapja
szülő
commit
218bede172
1 módosított fájl, 9 hozzáadás és 0 törlés
  1. 9 0
      README.md

+ 9 - 0
README.md

@@ -198,6 +198,15 @@ ollama.ps()
 
 
 - Returns: `<ListResponse>`
 - Returns: `<ListResponse>`
 
 
+### abort
+
+```javascript
+ollama.abort()
+```
+
+This method will abort all streamed generations currently running.
+All asynchronous threads listening to streams (typically the ```for await (const part of response)```) will throw an ```AbortError``` exception
+
 ## Custom client
 ## Custom client
 
 
 A custom client can be created with the following fields:
 A custom client can be created with the following fields: