Updated OllamaFunctionTool.toString to reflect what the Ollama API actually wants
build / build (push) Has been cancelled
build / build (push) Has been cancelled
Added @NotNull annotation to OllamaFunctionTool.name and OllamaFunctionTool.parameters since the documentation reports as these being required Made sure that OllamaFunctionTool.description is actually optional as the Ollama API docs define
This commit is contained in:
@@ -5,12 +5,13 @@ import me.zacharias.chat.ollama.OllamaFunctionArgument;
|
||||
import me.zacharias.chat.ollama.OllamaFunctionTool;
|
||||
import me.zacharias.chat.ollama.OllamaPerameter;
|
||||
import me.zacharias.chat.ollama.OllamaToolRespnce;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class GetWikiPageText extends OllamaFunctionTool {
|
||||
Wiki wiki = WikipediaTool.wiki;
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
public @NotNull String name() {
|
||||
return "get_wiki_page_text";
|
||||
}
|
||||
|
||||
@@ -20,7 +21,7 @@ public class GetWikiPageText extends OllamaFunctionTool {
|
||||
}
|
||||
|
||||
@Override
|
||||
public OllamaPerameter parameters() {
|
||||
public @NotNull OllamaPerameter parameters() {
|
||||
return OllamaPerameter.builder()
|
||||
.addProperty("title", OllamaPerameter.OllamaPerameterBuilder.Type.STRING, "The title of the Wikipedia page to retrieve text from.", true)
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user