Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
ToolRegistry.java
Go to the documentation of this file.
1package io.github.ollama4j.tools;
2
3import java.util.HashMap;
4import java.util.Map;
5
6public class ToolRegistry {
7 private final Map<String, ToolFunction> functionMap = new HashMap<>();
8
9 public ToolFunction getFunction(String name) {
10 return functionMap.get(name);
11 }
12
13 public void addFunction(String name, ToolFunction function) {
14 functionMap.put(name, function);
15 }
16}
ToolFunction getFunction(String name)
void addFunction(String name, ToolFunction function)