Class OllamaObject

java.lang.Object
me.neurodock.ollama.OllamaObject

public class OllamaObject extends Object
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:
  • Method Details

    • getModel

      public String getModel()
      Gets the model of the Ollama Object.
      Returns:
      The model of the Ollama Object
    • getMessages

      public ArrayList<OllamaMessage> getMessages()
      Gets the messages
      Returns:
      The messages
    • getTools

      public ArrayList<Pair<OllamaTool, String>> getTools()
      Gets the tools
      Returns:
      The tools
    • addTool

      public void addTool(OllamaTool tool, String source)
      Adds a tool to the Ollama Object
      Parameters:
      tool - The tool to add
    • removeTool

      public void removeTool(OllamaTool tool)
    • getFormat

      public org.json.JSONObject getFormat()
      Gets the format of the Ollama Object.
      Returns:
      The format of the Ollama Object
    • getOptions

      public Map<String,Object> getOptions()
      Gets the options of the Ollama Object.
      Returns:
      The options of the Ollama Object
    • isStream

      public boolean isStream()
      Gets if the Ollama Object is streamed.
      Returns:
      If the Ollama Object is streamed
    • getKeep_alive

      public String getKeep_alive()
      Gets the keep alive of the Ollama Object.
      Returns:
      The keep alive of the Ollama Object
    • addMessage

      public void addMessage(OllamaMessage message)
      Adds a message to the Ollama Object
      Parameters:
      message - The message to add
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static OllamaObject.OllamaObjectBuilder builder()
      Creates a new instance of OllamaObjectBuilder.
      Returns:
      The OllamaObject.OllamaObjectBuilder