Class OllamaObject
java.lang.Object
me.zacharias.chat.ollama.OllamaObject
Represents an Ollama Object.
This is used to represent the state of the Ollama Object.
This is used by the Core to store the state of the Ollama Object.
This is used by the API to send the state of the Ollama Object to the client.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a builder for OllamaObject. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessage(OllamaMessage message) Adds a message to the Ollama ObjectvoidaddTool(OllamaTool tool, String source) Adds a tool to the Ollama Objectbuilder()Creates a new instance of OllamaObjectBuilder.org.json.JSONObjectGets the format of the Ollama Object.Gets the keep alive of the Ollama Object.Gets the messagesgetModel()Gets the model of the Ollama Object.Gets the options of the Ollama Object.getTools()Gets the toolsbooleanisStream()Gets if the Ollama Object is streamed.voidremoveTool(OllamaTool tool) toString()
-
Method Details
-
getModel
Gets the model of the Ollama Object.- Returns:
- The model of the Ollama Object
-
getMessages
-
getTools
-
addTool
Adds a tool to the Ollama Object- Parameters:
tool- The tool to add
-
removeTool
-
getFormat
public org.json.JSONObject getFormat()Gets the format of the Ollama Object.- Returns:
- The format of the Ollama Object
-
getOptions
-
isStream
public boolean isStream()Gets if the Ollama Object is streamed.- Returns:
- If the Ollama Object is streamed
-
getKeep_alive
Gets the keep alive of the Ollama Object.- Returns:
- The keep alive of the Ollama Object
-
addMessage
Adds a message to the Ollama Object- Parameters:
message- The message to add
-
toString
-
builder
Creates a new instance of OllamaObjectBuilder.- Returns:
- The
OllamaObject.OllamaObjectBuilder
-