Add throws to the docs

This commit is contained in:
Mitchell Lutzke 2024-10-26 22:08:03 -07:00
parent 37193b1f5b
commit e2443ed68a

View File

@ -1,5 +1,6 @@
package io.github.ollama4j.utils; package io.github.ollama4j.utils;
import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
/** Builder class for creating options for Ollama model. */ /** Builder class for creating options for Ollama model. */
@ -223,6 +224,7 @@ public class OptionsBuilder {
* @param name The option name for the parameter. * @param name The option name for the parameter.
* @param value The value for the "{name}" parameter. * @param value The value for the "{name}" parameter.
* @return The updated OptionsBuilder. * @return The updated OptionsBuilder.
* @throws IllegalArgumentException if parameter has an unsupported type
*/ */
public OptionsBuilder setCustomOption(String name, Object value) throws IllegalArgumentException { public OptionsBuilder setCustomOption(String name, Object value) throws IllegalArgumentException {
if (!(value instanceof Integer || value instanceof Float || value instanceof String)) { if (!(value instanceof Integer || value instanceof Float || value instanceof String)) {