Mitt arbete är för att man ska skriva in en film titel och man får en overview av den filmen Men det finns små fel som kom nu i slutet och jag har inte hunit fixa det änu :(

This commit is contained in:
Noah F
2025-06-09 01:03:32 +02:00
parent 70e7e24aaa
commit f8680b1cab
11 changed files with 216 additions and 13 deletions

View File

@@ -52,7 +52,7 @@ public class Core {
/**
* The IP of the Ollama API.
*/
private String ollamaIP = "192.168.5.178";//"192.168.5.184";
private String ollamaIP = "localhost";//"192.168.5.184";
/**
* The port of the Ollama API.
*/
@@ -402,7 +402,7 @@ public class Core {
if(jsonObject.has("function"))
{
JSONObject function = jsonObject.getJSONObject("function");
List<Pair<OllamaFunctionTool, String>> functions = funtionTools.stream().filter(func -> (func.getKey().name()+func.getValue()).equalsIgnoreCase(function.getString("name"))).toList();
List<Pair<OllamaFunctionTool, String>> functions = funtionTools.stream().filter(func -> (func.getKey().name()).equalsIgnoreCase(function.getString("name"))).toList();
if(functions.isEmpty()) {
ollamaObject.addMessage(new OllamaToolError("Function '"+function.getString("name")+"' does not exist"));