You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+104-4Lines changed: 104 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -374,7 +374,110 @@ The transation of field types is as follows:
374
374
*`uint`, `int` - Translates to JSON `integer`
375
375
*`float32`, `float64` - Translates to JSON `number`
376
376
377
-
## Options
377
+
## Complete and Chat Options
378
+
379
+
These are the options you can use with the `Completion` and `Chat` methods.
380
+
381
+
<table>
382
+
<tr>
383
+
<th>Ollama</th>
384
+
<th>Anthropic</th>
385
+
<th>Mistral</th>
386
+
<th>OpenAI</th>
387
+
<th>Gemini</th>
388
+
</tr>
389
+
390
+
<tr><tdcolspan="6">
391
+
<code>llm.WithTemperature(float64)</code>
392
+
What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
393
+
</td></tr>
394
+
<trstyle="border-bottom: 2pxsolidblack;">
395
+
<td>Yes</td>
396
+
<td>Yes</td>
397
+
<td>Yes</td>
398
+
<td>Yes</td>
399
+
<td>Yes</td>
400
+
</tr>
401
+
402
+
</table>
403
+
404
+
## Embedding Options
405
+
406
+
These are the options you can include for the `Embedding`method.
407
+
408
+
<table>
409
+
<tr>
410
+
<th>Ollama</th>
411
+
<th>Anthropic</th>
412
+
<th>Mistral</th>
413
+
<th>OpenAI</th>
414
+
<th>Gemini</th>
415
+
</tr>
416
+
417
+
<tr><tdcolspan="6">
418
+
<code>ollama.WithKeepAlive(time.Duration)</code>
419
+
Controls how long the model will stay loaded into memory following the request
420
+
</td></tr>
421
+
<trstyle="border-bottom: 2pxsolidblack;">
422
+
<td>Yes</td>
423
+
<td>No</td>
424
+
<td>No</td>
425
+
<td>No</td>
426
+
<td>No</td>
427
+
</tr>
428
+
429
+
<tr><tdcolspan="6">
430
+
<code>ollama.WithTruncate()</code>
431
+
Does not truncate the end of each input to fit within context length. Returns error if context length is exceeded.
432
+
</td></tr>
433
+
<trstyle="border-bottom: 2pxsolidblack;">
434
+
<td>Yes</td>
435
+
<td>No</td>
436
+
<td>No</td>
437
+
<td>No</td>
438
+
<td>No</td>
439
+
</tr>
440
+
441
+
<tr><tdcolspan="6">
442
+
<code>ollama.WithOption(string, any)</code>
443
+
Set model-specific option value.
444
+
</td></tr>
445
+
<trstyle="border-bottom: 2pxsolidblack;">
446
+
<td>Yes</td>
447
+
<td>No</td>
448
+
<td>No</td>
449
+
<td>No</td>
450
+
<td>No</td>
451
+
</tr>
452
+
453
+
<tr><tdcolspan="6">
454
+
<code>openai.WithDimensions(uint64)</code>
455
+
The number of dimensions the resulting output embeddings
456
+
should have. Only supported in text-embedding-3 and later models.
457
+
</td></tr>
458
+
<trstyle="border-bottom: 2pxsolidblack;">
459
+
<td>No</td>
460
+
<td>No</td>
461
+
<td>No</td>
462
+
<td>Yes</td>
463
+
<td>No</td>
464
+
</tr>
465
+
466
+
<tr><tdcolspan="6">
467
+
<code>llm.WithFormat(string)</code>
468
+
The format to return the embeddings in. Can be either .
469
+
</td></tr>
470
+
<trstyle="border-bottom: 2pxsolidblack;">
471
+
<td>No</td>
472
+
<td>No</td>
473
+
<td>'float'</td>
474
+
<td>'float' or 'base64'</td>
475
+
<td>No</td>
476
+
</tr>
477
+
478
+
</table>
479
+
480
+
## Older Content
378
481
379
482
You can add options to sessions, or to prompts. Different providers and models support
0 commit comments