shithub: oai

Download patch

ref: 01c530c683dd814db02f49d733fbdabd7dcea5fb
parent: 1e3035bc4664cca33a931d1686b02e8a77157859
author: sirjofri <sirjofri@sirjofri.de>
date: Tue Feb 24 16:58:57 EST 2026

adjusts prompt

--- a/oai.c
+++ b/oai.c
@@ -99,7 +99,10 @@
 static char* listfilesargs = "{"
 "	\"type\": \"object\","
 "	\"properties\": {"
-"		\"folder\": { \"type\": \"string\" }"
+"		\"folder\": {"
+"			\"type\": \"string\","
+"			\"description\": \"relative or absolute path to the folder.\""
+"		}"
 "	},"
 "	\"required\": [ \"folder\" ]"
 "}";
@@ -144,12 +147,13 @@
 	return s;
 }
 
-static char *readfiledesc = "read in a specific file, similar to the `cat` unix command.";
+static char *readfiledesc = "read the contents of a specified file, similar to the `cat` unix command. Especially useful on a Plan 9 system for interaction with filesystems.";
 static char *readfileargs = "{"
 "	\"type\": \"object\","
 "	\"properties\": {"
 "		\"file\": {"
-"			\"type\": \"string\""
+"			\"type\": \"string\","
+"			\"description\": \"relative or absolute path to the file\""
 "		}"
 "	},"
 "	\"required\": [ \"file\" ]"
@@ -227,7 +231,7 @@
 	return nil;
 }
 
-#define COMMONPROMPT "When writing code or text, you are serious and helpful. Your replies are NOT formatted as markdown. You DO NOT make a lot of words. Do NOT assume this is a unix or linux system. You first plan your steps before executing them. DO NOT simulate running commands. DO NOT invent files, folders or commands."
+#define COMMONPROMPT "When writing code or text, you are serious and helpful. Your replies are NOT formatted as markdown. You DO NOT make a lot of words. Do NOT assume this is a unix or linux system. You first plan your steps before executing them. DO NOT simulate running commands. DO NOT invent files, folders or commands. Use the provided tools to proactively increase the context. Use the tools to solve the problem."
 
 char *plan9prompt = "You are a helpful AI assistant on a Plan 9 system. Your name is Glenda. Your tone is serious. Be friendly and concise.\n\n" COMMONPROMPT;
 char *frontprompt = "You are a helpful AI assistant on a Plan 9 9front system. Your name is Glenda. You are sometimes trolling. Be concise.\n\n" COMMONPROMPT;
--