├── .gitignore ├── .build ├── Start │ ├── DoUserInput │ │ ├── 01. HandleUserInputOrSettings.dll │ │ ├── 01. HandleUserInputOrSettings.pdb │ │ ├── 01. HandleUserInputBasedOnCondition.dll │ │ ├── 01. HandleUserInputBasedOnCondition.pdb │ │ ├── 01. HandleUserInputDecision.dll │ │ ├── 01. HandleUserInputDecision.pdb │ │ ├── 01. CheckUserInputAndCallGoal.dll │ │ ├── 01. CheckUserInputAndCallGoal.pdb │ │ ├── 02. ConditionalSettingsNavigation.dll │ │ ├── 02. ConditionalSettingsNavigation.pdb │ │ ├── 03. ConditionalAnalysisAndStore.dll │ │ ├── 03. ConditionalAnalysisAndStore.pdb │ │ ├── 01. HandleUserInputBasedOnSettings.dll │ │ └── 01. HandleUserInputBasedOnSettings.pdb │ ├── 01. CheckMeasurementAndSetup.dll │ ├── 01. CheckMeasurementAndSetup.pdb │ ├── 02. CheckMeasurementAndSetup.dll │ ├── 02. CheckMeasurementAndSetup.pdb │ ├── 02. CheckNostrAddressAndListen.dll │ ├── 02. CheckNostrAddressAndListen.pdb │ ├── 02. CheckNostrAddressNotEmpty.dll │ ├── 02. CheckNostrAddressNotEmpty.pdb │ ├── 03. CheckNostrAddressAndListen.dll │ ├── 03. CheckNostrAddressAndListen.pdb │ ├── 05. CheckUserInputAndCallGoal.dll │ ├── 05. CheckUserInputAndCallGoal.pdb │ ├── 06. CheckUserInputAndCallGoal.dll │ ├── 06. CheckUserInputAndCallGoal.pdb │ ├── 06. CheckUserInputAndExecute.dll │ ├── 06. CheckUserInputAndExecute.pdb │ ├── 07. CheckUserInputAndCallGoal.dll │ ├── 07. CheckUserInputAndCallGoal.pdb │ ├── 07. ConditionalAnalysisAndStore.dll │ ├── 07. ConditionalAnalysisAndStore.pdb │ ├── 08. ConditionalAnalysisAndStore.dll │ ├── 08. ConditionalAnalysisAndStore.pdb │ ├── 09. ConditionalAnalysisAndStore.dll │ ├── 09. ConditionalAnalysisAndStore.pdb │ ├── 06. ConditionalSettingsNavigation.dll │ ├── 06. ConditionalSettingsNavigation.pdb │ ├── 07. ConditionalSettingsNavigation.dll │ ├── 07. ConditionalSettingsNavigation.pdb │ ├── 08. ConditionalSettingsNavigation.dll │ ├── 08. ConditionalSettingsNavigation.pdb │ ├── HandleMessage │ │ ├── 01. CheckUserInputNotEmpty.dll │ │ └── 01. CheckUserInputNotEmpty.pdb │ ├── call goal %goalName% │ │ └── 00. Goal.pr │ └── HandleUserInput │ │ ├── 04. OutputPlan.pr │ │ └── 05. ExecuteGoalsInPlan.pr ├── info.txt ├── Chat │ ├── 05. TrimChatAssistantContent.dll │ └── 05. TrimChatAssistantContent.pdb ├── Settings │ ├── 05. ConditionalDeleteEntry.dll │ ├── 05. ConditionalDeleteEntry.pdb │ ├── 07. CheckAnswerAndCallStart.dll │ ├── 07. CheckAnswerAndCallStart.pdb │ ├── 03. ConditionalChangeSettings.dll │ ├── 03. ConditionalChangeSettings.pdb │ ├── 05. CheckAnswerAndDeleteEntry.dll │ ├── 05. CheckAnswerAndDeleteEntry.pdb │ ├── 06. CheckAnswerAndDeleteEntry.dll │ ├── 06. CheckAnswerAndDeleteEntry.pdb │ ├── DeleteEntry │ │ ├── 04. CheckEntryId.dll │ │ ├── 04. CheckEntryId.pdb │ │ ├── 05. DeleteFoodEntry.pr │ │ └── 02. ForEachEntry.pr │ ├── 04. CheckAnswerAndChangeAddress.dll │ ├── 04. CheckAnswerAndChangeAddress.pdb │ ├── 05. CheckAnswerAndChangeLanguage.dll │ ├── 05. CheckAnswerAndChangeLanguage.pdb │ ├── 03. CheckAnswerAndChangeMeasurement.dll │ ├── 03. CheckAnswerAndChangeMeasurement.pdb │ └── 08. CallStartGoal.pr ├── entry │ ├── Insert │ │ ├── 03. CheckEventNotEmpty.dll │ │ ├── 03. CheckEventNotEmpty.pdb │ │ ├── 09. HandleUnknownDish.dll │ │ ├── 09. HandleUnknownDish.pdb │ │ ├── 10. HandleUnknownDish.dll │ │ ├── 10. HandleUnknownDish.pdb │ │ ├── 11. HandleUnknownDish.dll │ │ ├── 11. HandleUnknownDish.pdb │ │ ├── 09. CheckCaloriesAndCall.dll │ │ ├── 09. CheckCaloriesAndCall.pdb │ │ ├── 09. HandleUnknownDishEntry.dll │ │ ├── 09. HandleUnknownDishEntry.pdb │ │ └── 01. DisplayInsertMessage.pr │ ├── Query │ │ ├── 05. ConditionalErrorHandling.dll │ │ └── 05. ConditionalErrorHandling.pdb │ ├── Delete │ │ └── 08. ExecuteSQL.pr │ └── Update │ │ ├── 08. ExecuteSQLUpdate.pr │ │ └── 07. OutputSQLAndExplanation.pr ├── events │ ├── HandleError │ │ ├── 01. CheckBalance.dll │ │ ├── 01. CheckBalance.pdb │ │ ├── 01. CheckBalanceCondition.dll │ │ └── 01. CheckBalanceCondition.pdb │ ├── CheckBalance │ │ ├── 01. CheckLLMBalance.dll │ │ ├── 01. CheckLLMBalance.pdb │ │ ├── 01. CheckBalanceCondition.dll │ │ └── 01. CheckBalanceCondition.pdb │ ├── CheckGoals │ │ ├── 04. CheckAndDisplayGoals.dll │ │ ├── 04. CheckAndDisplayGoals.pdb │ │ ├── CheckCallingGoal │ │ │ ├── 03. CheckGoalToCall.dll │ │ │ ├── 03. CheckGoalToCall.pdb │ │ │ ├── 06. CheckIfDirsEmpty.dll │ │ │ ├── 06. CheckIfDirsEmpty.pdb │ │ │ ├── 07. CheckMissingGoals.dll │ │ │ ├── 07. CheckMissingGoals.pdb │ │ │ ├── 08. CheckMissingGoals.dll │ │ │ ├── 08. CheckMissingGoals.pdb │ │ │ ├── 09. CheckMissingGoals.dll │ │ │ ├── 09. CheckMissingGoals.pdb │ │ │ ├── 10. CheckMissingGoals.dll │ │ │ ├── 10. CheckMissingGoals.pdb │ │ │ ├── 05. CheckDirectoryLength.dll │ │ │ ├── 05. CheckDirectoryLength.pdb │ │ │ ├── 06. CheckDirectoryLength.dll │ │ │ ├── 06. CheckDirectoryLength.pdb │ │ │ ├── 07. CheckDirectoryLength.dll │ │ │ ├── 07. CheckDirectoryLength.pdb │ │ │ ├── 08. CheckDirectoryLength.dll │ │ │ └── 08. CheckDirectoryLength.pdb │ │ ├── CheckStep │ │ │ ├── 01. CheckModuleTypeAndCallGoal.dll │ │ │ ├── 01. CheckModuleTypeAndCallGoal.pdb │ │ │ ├── 02. CheckModuleTypeAndCallGoal.dll │ │ │ ├── 02. CheckModuleTypeAndCallGoal.pdb │ │ │ ├── 03. CheckModuleTypeAndCallGoal.dll │ │ │ └── 03. CheckModuleTypeAndCallGoal.pdb │ │ ├── 03. ProcessGoalFiles.pr │ │ └── CheckGoal │ │ │ └── 01. CheckGoalSteps.pr │ └── SendDebug │ │ ├── 02. CheckDebugResponseAndGoToLine.dll │ │ └── 02. CheckDebugResponseAndGoToLine.pdb ├── knowledge │ ├── Delete │ │ ├── 05. ConditionalCall.dll │ │ ├── 05. ConditionalCall.pdb │ │ ├── 07. CheckSQLNotNull.dll │ │ ├── 07. CheckSQLNotNull.pdb │ │ ├── 07. CheckSQLNotEmpty.dll │ │ ├── 07. CheckSQLNotEmpty.pdb │ │ ├── 08. ExecuteDeleteSQL.pr │ │ ├── DeleteKnowledge │ │ │ └── 02. DeleteDatabaseRecord.pr │ │ ├── DeleteKnowledges │ │ │ └── 01. ForEachDeleteKnowledge.pr │ │ └── NotFound │ │ │ └── 01. ProcessKnowledgeItems.pr │ ├── Insert │ │ ├── 10. CheckSQLsNotEmpty.dll │ │ ├── 10. CheckSQLsNotEmpty.pdb │ │ ├── 11. CheckSQLsNotEmpty.dll │ │ ├── 11. CheckSQLsNotEmpty.pdb │ │ ├── UpdateFoodEntry │ │ │ └── 01. ExecuteSQLUpdate.pr │ │ └── 08. OutputUpdateCommand.pr │ ├── Update │ │ ├── 05. ConditionalSQLCheck.dll │ │ ├── 05. ConditionalSQLCheck.pdb │ │ ├── 06. ConditionalSqlExecution.dll │ │ ├── 06. ConditionalSqlExecution.pdb │ │ ├── 05. ConditionalKnowledgeUpdate.dll │ │ ├── 05. ConditionalKnowledgeUpdate.pdb │ │ ├── 06. ConditionalKnowledgeUpdate.dll │ │ ├── 06. ConditionalKnowledgeUpdate.pdb │ │ └── UpdateKnowledge │ │ │ └── 01. ExecuteSQLUpdate.pr │ └── Query │ │ └── 02. ProcessKnowledgeItems.pr ├── AnalyzeAndStore │ ├── 02. CheckEventNotEmpty.dll │ ├── 02. CheckEventNotEmpty.pdb │ ├── 02. ProcessEventDetails.dll │ ├── 02. ProcessEventDetails.pdb │ └── 08. CallStartGoal.pr ├── SendMessage │ ├── 01. CheckMessageCondition.dll │ ├── 01. CheckMessageCondition.pdb │ ├── 02. CheckMessageCondition.dll │ ├── 02. CheckMessageCondition.pdb │ └── 01. WriteOutput.pr ├── actions │ ├── Insert │ │ ├── 02. CheckEventNotEmpty.dll │ │ ├── 02. CheckEventNotEmpty.pdb │ │ ├── 03. CheckEventNotEmpty.dll │ │ ├── 03. CheckEventNotEmpty.pdb │ │ ├── 09. CheckCaloriesAndCall.dll │ │ ├── 09. CheckCaloriesAndCall.pdb │ │ ├── 01. DisplayInsertMessage.pr │ │ └── 06. OutputUserInput.pr │ ├── Chat │ │ ├── 02. TrimChatAssistantContent.dll │ │ ├── 02. TrimChatAssistantContent.pdb │ │ ├── 04. TrimChatAssistantContent.dll │ │ ├── 04. TrimChatAssistantContent.pdb │ │ ├── 05. TrimChatAssistantContent.dll │ │ ├── 05. TrimChatAssistantContent.pdb │ │ ├── 02. TrimAndWriteChatAssistant.dll │ │ └── 02. TrimAndWriteChatAssistant.pdb │ ├── Select │ │ ├── 04. ConditionalErrorHandling.dll │ │ ├── 04. ConditionalErrorHandling.pdb │ │ ├── 05. ConditionalErrorHandling.dll │ │ ├── 05. ConditionalErrorHandling.pdb │ │ ├── 01. DisplayDoingSelect.pr │ │ └── DoResults │ │ │ └── 01. DatabaseSelect.pr │ ├── Delete │ │ ├── 09. ExecuteSQL.pr │ │ └── 08. OutputSQLAndExplain.pr │ └── Update │ │ ├── 09. ExecuteSQLUpdate.pr │ │ └── 08. OutputSQLAndExplanation.pr ├── FirstTimeSetup │ ├── 03. CheckSetNostrCondition.dll │ ├── 03. CheckSetNostrCondition.pdb │ ├── 04. CheckSetNostrCondition.dll │ └── 04. CheckSetNostrCondition.pdb ├── Setup │ ├── 05. AddColumnToTable.pr │ ├── 03. CreateDatabaseTable.pr │ ├── 04. AddColumnsToFooodEntries.pr │ └── 02. CreateSymptomsTable.pr └── ShowLastFiveDays │ └── 02. ForEachPrintEntry.pr ├── usage.jpg ├── events ├── BuildEvents.goal ├── HandleError.goal ├── CheckBalance.goal ├── Events.goal ├── LoadSystemSettings.goal ├── SendDebug.goal └── CheckGoals.goal ├── FoodDiaryApp.zip ├── knowledge ├── GetKnowledge.goal ├── Query.goal ├── llm │ ├── tableInfo.txt │ ├── deleteAssistant.txt │ ├── insertSystem.txt │ ├── updateSystem.txt │ ├── deleteSystem.txt │ └── updatePrevSystem.txt ├── Delete.goal ├── Update.goal └── Insert.goal ├── symtpoms ├── Insert.goal ├── llm │ ├── symptomsSystem.txt │ └── symptomsAssistant.txt └── Query.goal ├── SendMessage.goal ├── entry ├── llm │ ├── updateAssistant.txt │ ├── queryResultsSystem.txt │ ├── deleteAssistant.txt │ ├── tableInfo.txt │ ├── querySystem.txt │ ├── updateSystem.txt │ ├── updateResultSystem.txt │ ├── deleteSystem.txt │ └── insertSystem.txt ├── Update.goal ├── Delete.goal ├── Query.goal └── Insert.goal ├── Setup.goal ├── FirstTimeSetup.goal ├── Chat.goal ├── draftidea.txt ├── llm ├── chatSystem.txt └── chooseGoalSystem.txt ├── LICENSE ├── Settings.goal └── Start.goal /.gitignore: -------------------------------------------------------------------------------- 1 | .db -------------------------------------------------------------------------------- /.build/Start/DoUserInput/01. HandleUserInputOrSettings.dll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.build/Start/DoUserInput/01. HandleUserInputOrSettings.pdb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.build/Start/DoUserInput/01. HandleUserInputBasedOnCondition.dll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.build/Start/DoUserInput/01. HandleUserInputBasedOnCondition.pdb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.build/info.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | AppId: 9f0dc27c-de8b-4d1e-b60b-366f6688036a -------------------------------------------------------------------------------- /usage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/usage.jpg -------------------------------------------------------------------------------- /events/BuildEvents.goal: -------------------------------------------------------------------------------- 1 | BuildEvents 2 | - before builder ends, call goal !CheckGoals -------------------------------------------------------------------------------- /FoodDiaryApp.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/FoodDiaryApp.zip -------------------------------------------------------------------------------- /knowledge/GetKnowledge.goal: -------------------------------------------------------------------------------- 1 | GetKnowledge 2 | - select * from knowledge, write to %knowledge% -------------------------------------------------------------------------------- /.build/Chat/05. TrimChatAssistantContent.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Chat/05. TrimChatAssistantContent.dll -------------------------------------------------------------------------------- /.build/Chat/05. TrimChatAssistantContent.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Chat/05. TrimChatAssistantContent.pdb -------------------------------------------------------------------------------- /.build/Settings/05. ConditionalDeleteEntry.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/05. ConditionalDeleteEntry.dll -------------------------------------------------------------------------------- /.build/Settings/05. ConditionalDeleteEntry.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/05. ConditionalDeleteEntry.pdb -------------------------------------------------------------------------------- /.build/Settings/07. CheckAnswerAndCallStart.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/07. CheckAnswerAndCallStart.dll -------------------------------------------------------------------------------- /.build/Settings/07. CheckAnswerAndCallStart.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/07. CheckAnswerAndCallStart.pdb -------------------------------------------------------------------------------- /.build/Start/01. CheckMeasurementAndSetup.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/01. CheckMeasurementAndSetup.dll -------------------------------------------------------------------------------- /.build/Start/01. CheckMeasurementAndSetup.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/01. CheckMeasurementAndSetup.pdb -------------------------------------------------------------------------------- /.build/Start/02. CheckMeasurementAndSetup.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/02. CheckMeasurementAndSetup.dll -------------------------------------------------------------------------------- /.build/Start/02. CheckMeasurementAndSetup.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/02. CheckMeasurementAndSetup.pdb -------------------------------------------------------------------------------- /.build/Start/02. CheckNostrAddressAndListen.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/02. CheckNostrAddressAndListen.dll -------------------------------------------------------------------------------- /.build/Start/02. CheckNostrAddressAndListen.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/02. CheckNostrAddressAndListen.pdb -------------------------------------------------------------------------------- /.build/Start/02. CheckNostrAddressNotEmpty.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/02. CheckNostrAddressNotEmpty.dll -------------------------------------------------------------------------------- /.build/Start/02. CheckNostrAddressNotEmpty.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/02. CheckNostrAddressNotEmpty.pdb -------------------------------------------------------------------------------- /.build/Start/03. CheckNostrAddressAndListen.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/03. CheckNostrAddressAndListen.dll -------------------------------------------------------------------------------- /.build/Start/03. CheckNostrAddressAndListen.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/03. CheckNostrAddressAndListen.pdb -------------------------------------------------------------------------------- /.build/Start/05. CheckUserInputAndCallGoal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/05. CheckUserInputAndCallGoal.dll -------------------------------------------------------------------------------- /.build/Start/05. CheckUserInputAndCallGoal.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/05. CheckUserInputAndCallGoal.pdb -------------------------------------------------------------------------------- /.build/Start/06. CheckUserInputAndCallGoal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/06. CheckUserInputAndCallGoal.dll -------------------------------------------------------------------------------- /.build/Start/06. CheckUserInputAndCallGoal.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/06. CheckUserInputAndCallGoal.pdb -------------------------------------------------------------------------------- /.build/Start/06. CheckUserInputAndExecute.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/06. CheckUserInputAndExecute.dll -------------------------------------------------------------------------------- /.build/Start/06. CheckUserInputAndExecute.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/06. CheckUserInputAndExecute.pdb -------------------------------------------------------------------------------- /.build/Start/07. CheckUserInputAndCallGoal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/07. CheckUserInputAndCallGoal.dll -------------------------------------------------------------------------------- /.build/Start/07. CheckUserInputAndCallGoal.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/07. CheckUserInputAndCallGoal.pdb -------------------------------------------------------------------------------- /.build/entry/Insert/03. CheckEventNotEmpty.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/03. CheckEventNotEmpty.dll -------------------------------------------------------------------------------- /.build/entry/Insert/03. CheckEventNotEmpty.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/03. CheckEventNotEmpty.pdb -------------------------------------------------------------------------------- /.build/entry/Insert/09. HandleUnknownDish.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/09. HandleUnknownDish.dll -------------------------------------------------------------------------------- /.build/entry/Insert/09. HandleUnknownDish.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/09. HandleUnknownDish.pdb -------------------------------------------------------------------------------- /.build/entry/Insert/10. HandleUnknownDish.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/10. HandleUnknownDish.dll -------------------------------------------------------------------------------- /.build/entry/Insert/10. HandleUnknownDish.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/10. HandleUnknownDish.pdb -------------------------------------------------------------------------------- /.build/entry/Insert/11. HandleUnknownDish.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/11. HandleUnknownDish.dll -------------------------------------------------------------------------------- /.build/entry/Insert/11. HandleUnknownDish.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/11. HandleUnknownDish.pdb -------------------------------------------------------------------------------- /.build/events/HandleError/01. CheckBalance.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/HandleError/01. CheckBalance.dll -------------------------------------------------------------------------------- /.build/events/HandleError/01. CheckBalance.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/HandleError/01. CheckBalance.pdb -------------------------------------------------------------------------------- /.build/knowledge/Delete/05. ConditionalCall.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Delete/05. ConditionalCall.dll -------------------------------------------------------------------------------- /.build/knowledge/Delete/05. ConditionalCall.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Delete/05. ConditionalCall.pdb -------------------------------------------------------------------------------- /.build/knowledge/Delete/07. CheckSQLNotNull.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Delete/07. CheckSQLNotNull.dll -------------------------------------------------------------------------------- /.build/knowledge/Delete/07. CheckSQLNotNull.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Delete/07. CheckSQLNotNull.pdb -------------------------------------------------------------------------------- /.build/AnalyzeAndStore/02. CheckEventNotEmpty.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/AnalyzeAndStore/02. CheckEventNotEmpty.dll -------------------------------------------------------------------------------- /.build/AnalyzeAndStore/02. CheckEventNotEmpty.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/AnalyzeAndStore/02. CheckEventNotEmpty.pdb -------------------------------------------------------------------------------- /.build/SendMessage/01. CheckMessageCondition.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/SendMessage/01. CheckMessageCondition.dll -------------------------------------------------------------------------------- /.build/SendMessage/01. CheckMessageCondition.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/SendMessage/01. CheckMessageCondition.pdb -------------------------------------------------------------------------------- /.build/SendMessage/02. CheckMessageCondition.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/SendMessage/02. CheckMessageCondition.dll -------------------------------------------------------------------------------- /.build/SendMessage/02. CheckMessageCondition.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/SendMessage/02. CheckMessageCondition.pdb -------------------------------------------------------------------------------- /.build/Settings/03. ConditionalChangeSettings.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/03. ConditionalChangeSettings.dll -------------------------------------------------------------------------------- /.build/Settings/03. ConditionalChangeSettings.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/03. ConditionalChangeSettings.pdb -------------------------------------------------------------------------------- /.build/Settings/05. CheckAnswerAndDeleteEntry.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/05. CheckAnswerAndDeleteEntry.dll -------------------------------------------------------------------------------- /.build/Settings/05. CheckAnswerAndDeleteEntry.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/05. CheckAnswerAndDeleteEntry.pdb -------------------------------------------------------------------------------- /.build/Settings/06. CheckAnswerAndDeleteEntry.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/06. CheckAnswerAndDeleteEntry.dll -------------------------------------------------------------------------------- /.build/Settings/06. CheckAnswerAndDeleteEntry.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/06. CheckAnswerAndDeleteEntry.pdb -------------------------------------------------------------------------------- /.build/Settings/DeleteEntry/04. CheckEntryId.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/DeleteEntry/04. CheckEntryId.dll -------------------------------------------------------------------------------- /.build/Settings/DeleteEntry/04. CheckEntryId.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/DeleteEntry/04. CheckEntryId.pdb -------------------------------------------------------------------------------- /.build/Start/07. ConditionalAnalysisAndStore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/07. ConditionalAnalysisAndStore.dll -------------------------------------------------------------------------------- /.build/Start/07. ConditionalAnalysisAndStore.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/07. ConditionalAnalysisAndStore.pdb -------------------------------------------------------------------------------- /.build/Start/08. ConditionalAnalysisAndStore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/08. ConditionalAnalysisAndStore.dll -------------------------------------------------------------------------------- /.build/Start/08. ConditionalAnalysisAndStore.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/08. ConditionalAnalysisAndStore.pdb -------------------------------------------------------------------------------- /.build/Start/09. ConditionalAnalysisAndStore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/09. ConditionalAnalysisAndStore.dll -------------------------------------------------------------------------------- /.build/Start/09. ConditionalAnalysisAndStore.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/09. ConditionalAnalysisAndStore.pdb -------------------------------------------------------------------------------- /.build/actions/Insert/02. CheckEventNotEmpty.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Insert/02. CheckEventNotEmpty.dll -------------------------------------------------------------------------------- /.build/actions/Insert/02. CheckEventNotEmpty.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Insert/02. CheckEventNotEmpty.pdb -------------------------------------------------------------------------------- /.build/actions/Insert/03. CheckEventNotEmpty.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Insert/03. CheckEventNotEmpty.dll -------------------------------------------------------------------------------- /.build/actions/Insert/03. CheckEventNotEmpty.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Insert/03. CheckEventNotEmpty.pdb -------------------------------------------------------------------------------- /.build/entry/Insert/09. CheckCaloriesAndCall.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/09. CheckCaloriesAndCall.dll -------------------------------------------------------------------------------- /.build/entry/Insert/09. CheckCaloriesAndCall.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/09. CheckCaloriesAndCall.pdb -------------------------------------------------------------------------------- /.build/knowledge/Delete/07. CheckSQLNotEmpty.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Delete/07. CheckSQLNotEmpty.dll -------------------------------------------------------------------------------- /.build/knowledge/Delete/07. CheckSQLNotEmpty.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Delete/07. CheckSQLNotEmpty.pdb -------------------------------------------------------------------------------- /.build/knowledge/Insert/10. CheckSQLsNotEmpty.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Insert/10. CheckSQLsNotEmpty.dll -------------------------------------------------------------------------------- /.build/knowledge/Insert/10. CheckSQLsNotEmpty.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Insert/10. CheckSQLsNotEmpty.pdb -------------------------------------------------------------------------------- /.build/knowledge/Insert/11. CheckSQLsNotEmpty.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Insert/11. CheckSQLsNotEmpty.dll -------------------------------------------------------------------------------- /.build/knowledge/Insert/11. CheckSQLsNotEmpty.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Insert/11. CheckSQLsNotEmpty.pdb -------------------------------------------------------------------------------- /.build/AnalyzeAndStore/02. ProcessEventDetails.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/AnalyzeAndStore/02. ProcessEventDetails.dll -------------------------------------------------------------------------------- /.build/AnalyzeAndStore/02. ProcessEventDetails.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/AnalyzeAndStore/02. ProcessEventDetails.pdb -------------------------------------------------------------------------------- /.build/FirstTimeSetup/03. CheckSetNostrCondition.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/FirstTimeSetup/03. CheckSetNostrCondition.dll -------------------------------------------------------------------------------- /.build/FirstTimeSetup/03. CheckSetNostrCondition.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/FirstTimeSetup/03. CheckSetNostrCondition.pdb -------------------------------------------------------------------------------- /.build/FirstTimeSetup/04. CheckSetNostrCondition.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/FirstTimeSetup/04. CheckSetNostrCondition.dll -------------------------------------------------------------------------------- /.build/FirstTimeSetup/04. CheckSetNostrCondition.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/FirstTimeSetup/04. CheckSetNostrCondition.pdb -------------------------------------------------------------------------------- /.build/Settings/04. CheckAnswerAndChangeAddress.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/04. CheckAnswerAndChangeAddress.dll -------------------------------------------------------------------------------- /.build/Settings/04. CheckAnswerAndChangeAddress.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/04. CheckAnswerAndChangeAddress.pdb -------------------------------------------------------------------------------- /.build/Settings/05. CheckAnswerAndChangeLanguage.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/05. CheckAnswerAndChangeLanguage.dll -------------------------------------------------------------------------------- /.build/Settings/05. CheckAnswerAndChangeLanguage.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/05. CheckAnswerAndChangeLanguage.pdb -------------------------------------------------------------------------------- /.build/Start/06. ConditionalSettingsNavigation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/06. ConditionalSettingsNavigation.dll -------------------------------------------------------------------------------- /.build/Start/06. ConditionalSettingsNavigation.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/06. ConditionalSettingsNavigation.pdb -------------------------------------------------------------------------------- /.build/Start/07. ConditionalSettingsNavigation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/07. ConditionalSettingsNavigation.dll -------------------------------------------------------------------------------- /.build/Start/07. ConditionalSettingsNavigation.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/07. ConditionalSettingsNavigation.pdb -------------------------------------------------------------------------------- /.build/Start/08. ConditionalSettingsNavigation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/08. ConditionalSettingsNavigation.dll -------------------------------------------------------------------------------- /.build/Start/08. ConditionalSettingsNavigation.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/08. ConditionalSettingsNavigation.pdb -------------------------------------------------------------------------------- /.build/actions/Chat/02. TrimChatAssistantContent.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Chat/02. TrimChatAssistantContent.dll -------------------------------------------------------------------------------- /.build/actions/Chat/02. TrimChatAssistantContent.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Chat/02. TrimChatAssistantContent.pdb -------------------------------------------------------------------------------- /.build/actions/Chat/04. TrimChatAssistantContent.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Chat/04. TrimChatAssistantContent.dll -------------------------------------------------------------------------------- /.build/actions/Chat/04. TrimChatAssistantContent.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Chat/04. TrimChatAssistantContent.pdb -------------------------------------------------------------------------------- /.build/actions/Chat/05. TrimChatAssistantContent.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Chat/05. TrimChatAssistantContent.dll -------------------------------------------------------------------------------- /.build/actions/Chat/05. TrimChatAssistantContent.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Chat/05. TrimChatAssistantContent.pdb -------------------------------------------------------------------------------- /.build/actions/Insert/09. CheckCaloriesAndCall.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Insert/09. CheckCaloriesAndCall.dll -------------------------------------------------------------------------------- /.build/actions/Insert/09. CheckCaloriesAndCall.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Insert/09. CheckCaloriesAndCall.pdb -------------------------------------------------------------------------------- /.build/entry/Insert/09. HandleUnknownDishEntry.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/09. HandleUnknownDishEntry.dll -------------------------------------------------------------------------------- /.build/entry/Insert/09. HandleUnknownDishEntry.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Insert/09. HandleUnknownDishEntry.pdb -------------------------------------------------------------------------------- /.build/entry/Query/05. ConditionalErrorHandling.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Query/05. ConditionalErrorHandling.dll -------------------------------------------------------------------------------- /.build/entry/Query/05. ConditionalErrorHandling.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/entry/Query/05. ConditionalErrorHandling.pdb -------------------------------------------------------------------------------- /.build/events/CheckBalance/01. CheckLLMBalance.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckBalance/01. CheckLLMBalance.dll -------------------------------------------------------------------------------- /.build/events/CheckBalance/01. CheckLLMBalance.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckBalance/01. CheckLLMBalance.pdb -------------------------------------------------------------------------------- /.build/knowledge/Update/05. ConditionalSQLCheck.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Update/05. ConditionalSQLCheck.dll -------------------------------------------------------------------------------- /.build/knowledge/Update/05. ConditionalSQLCheck.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Update/05. ConditionalSQLCheck.pdb -------------------------------------------------------------------------------- /.build/actions/Chat/02. TrimAndWriteChatAssistant.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Chat/02. TrimAndWriteChatAssistant.dll -------------------------------------------------------------------------------- /.build/actions/Chat/02. TrimAndWriteChatAssistant.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Chat/02. TrimAndWriteChatAssistant.pdb -------------------------------------------------------------------------------- /.build/actions/Select/04. ConditionalErrorHandling.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Select/04. ConditionalErrorHandling.dll -------------------------------------------------------------------------------- /.build/actions/Select/04. ConditionalErrorHandling.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Select/04. ConditionalErrorHandling.pdb -------------------------------------------------------------------------------- /.build/actions/Select/05. ConditionalErrorHandling.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Select/05. ConditionalErrorHandling.dll -------------------------------------------------------------------------------- /.build/actions/Select/05. ConditionalErrorHandling.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/actions/Select/05. ConditionalErrorHandling.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/04. CheckAndDisplayGoals.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/04. CheckAndDisplayGoals.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/04. CheckAndDisplayGoals.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/04. CheckAndDisplayGoals.pdb -------------------------------------------------------------------------------- /.build/Settings/03. CheckAnswerAndChangeMeasurement.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/03. CheckAnswerAndChangeMeasurement.dll -------------------------------------------------------------------------------- /.build/Settings/03. CheckAnswerAndChangeMeasurement.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Settings/03. CheckAnswerAndChangeMeasurement.pdb -------------------------------------------------------------------------------- /.build/Start/DoUserInput/01. HandleUserInputDecision.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/DoUserInput/01. HandleUserInputDecision.dll -------------------------------------------------------------------------------- /.build/Start/DoUserInput/01. HandleUserInputDecision.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/DoUserInput/01. HandleUserInputDecision.pdb -------------------------------------------------------------------------------- /.build/Start/HandleMessage/01. CheckUserInputNotEmpty.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/HandleMessage/01. CheckUserInputNotEmpty.dll -------------------------------------------------------------------------------- /.build/Start/HandleMessage/01. CheckUserInputNotEmpty.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/HandleMessage/01. CheckUserInputNotEmpty.pdb -------------------------------------------------------------------------------- /.build/events/CheckBalance/01. CheckBalanceCondition.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckBalance/01. CheckBalanceCondition.dll -------------------------------------------------------------------------------- /.build/events/CheckBalance/01. CheckBalanceCondition.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckBalance/01. CheckBalanceCondition.pdb -------------------------------------------------------------------------------- /.build/events/HandleError/01. CheckBalanceCondition.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/HandleError/01. CheckBalanceCondition.dll -------------------------------------------------------------------------------- /.build/events/HandleError/01. CheckBalanceCondition.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/HandleError/01. CheckBalanceCondition.pdb -------------------------------------------------------------------------------- /.build/knowledge/Update/06. ConditionalSqlExecution.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Update/06. ConditionalSqlExecution.dll -------------------------------------------------------------------------------- /.build/knowledge/Update/06. ConditionalSqlExecution.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Update/06. ConditionalSqlExecution.pdb -------------------------------------------------------------------------------- /.build/Start/DoUserInput/01. CheckUserInputAndCallGoal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/DoUserInput/01. CheckUserInputAndCallGoal.dll -------------------------------------------------------------------------------- /.build/Start/DoUserInput/01. CheckUserInputAndCallGoal.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/DoUserInput/01. CheckUserInputAndCallGoal.pdb -------------------------------------------------------------------------------- /.build/knowledge/Update/05. ConditionalKnowledgeUpdate.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Update/05. ConditionalKnowledgeUpdate.dll -------------------------------------------------------------------------------- /.build/knowledge/Update/05. ConditionalKnowledgeUpdate.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Update/05. ConditionalKnowledgeUpdate.pdb -------------------------------------------------------------------------------- /.build/knowledge/Update/06. ConditionalKnowledgeUpdate.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Update/06. ConditionalKnowledgeUpdate.dll -------------------------------------------------------------------------------- /.build/knowledge/Update/06. ConditionalKnowledgeUpdate.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/knowledge/Update/06. ConditionalKnowledgeUpdate.pdb -------------------------------------------------------------------------------- /symtpoms/Insert.goal: -------------------------------------------------------------------------------- 1 | Symptoms 2 | - write out 'Doing Symptoms' 3 | - insert into Symptoms description=%userInput% 4 | - append to %output% = '👍 Got it - %userInput%' 5 | -------------------------------------------------------------------------------- /symtpoms/llm/symptomsSystem.txt: -------------------------------------------------------------------------------- 1 | Act as Gastroenterologists 2 | You are provided with list of symptoms and food entries from a food diary 3 | Help the user with his input 4 | -------------------------------------------------------------------------------- /.build/Start/DoUserInput/02. ConditionalSettingsNavigation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/DoUserInput/02. ConditionalSettingsNavigation.dll -------------------------------------------------------------------------------- /.build/Start/DoUserInput/02. ConditionalSettingsNavigation.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/DoUserInput/02. ConditionalSettingsNavigation.pdb -------------------------------------------------------------------------------- /.build/Start/DoUserInput/03. ConditionalAnalysisAndStore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/DoUserInput/03. ConditionalAnalysisAndStore.dll -------------------------------------------------------------------------------- /.build/Start/DoUserInput/03. ConditionalAnalysisAndStore.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/DoUserInput/03. ConditionalAnalysisAndStore.pdb -------------------------------------------------------------------------------- /.build/events/SendDebug/02. CheckDebugResponseAndGoToLine.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/SendDebug/02. CheckDebugResponseAndGoToLine.dll -------------------------------------------------------------------------------- /.build/events/SendDebug/02. CheckDebugResponseAndGoToLine.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/SendDebug/02. CheckDebugResponseAndGoToLine.pdb -------------------------------------------------------------------------------- /knowledge/Query.goal: -------------------------------------------------------------------------------- 1 | Select 2 | - call GetKnowledge 3 | - foreach %knowledge% call !CreateKnowledgeText 4 | - append to %output% = "This is my knowledge: 5 | %knowledgeText%" -------------------------------------------------------------------------------- /symtpoms/llm/symptomsAssistant.txt: -------------------------------------------------------------------------------- 1 | === Last food entries === 2 | %foodEntries% 3 | === Last food entries === 4 | === Last symptoms === 5 | %symptoms% 6 | === Last symptoms === -------------------------------------------------------------------------------- /.build/Start/DoUserInput/01. HandleUserInputBasedOnSettings.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/DoUserInput/01. HandleUserInputBasedOnSettings.dll -------------------------------------------------------------------------------- /.build/Start/DoUserInput/01. HandleUserInputBasedOnSettings.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/Start/DoUserInput/01. HandleUserInputBasedOnSettings.pdb -------------------------------------------------------------------------------- /SendMessage.goal: -------------------------------------------------------------------------------- 1 | SendMessage 2 | - write out %content% 3 | - if %IsMessage% then 4 | - send message to %Settings.NostrAddress%, content=%content% 5 | - set %IsMessage% = false -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/03. CheckGoalToCall.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/03. CheckGoalToCall.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/03. CheckGoalToCall.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/03. CheckGoalToCall.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/06. CheckIfDirsEmpty.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/06. CheckIfDirsEmpty.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/06. CheckIfDirsEmpty.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/06. CheckIfDirsEmpty.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/07. CheckMissingGoals.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/07. CheckMissingGoals.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/07. CheckMissingGoals.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/07. CheckMissingGoals.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/08. CheckMissingGoals.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/08. CheckMissingGoals.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/08. CheckMissingGoals.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/08. CheckMissingGoals.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/09. CheckMissingGoals.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/09. CheckMissingGoals.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/09. CheckMissingGoals.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/09. CheckMissingGoals.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/10. CheckMissingGoals.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/10. CheckMissingGoals.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/10. CheckMissingGoals.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/10. CheckMissingGoals.pdb -------------------------------------------------------------------------------- /entry/llm/updateAssistant.txt: -------------------------------------------------------------------------------- 1 | === Database structure === 2 | %tableInfo% 3 | === Database structure === 4 | === Last food entries === 5 | %foodEntries% 6 | === Last food entries === 7 | -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckStep/01. CheckModuleTypeAndCallGoal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckStep/01. CheckModuleTypeAndCallGoal.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckStep/01. CheckModuleTypeAndCallGoal.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckStep/01. CheckModuleTypeAndCallGoal.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckStep/02. CheckModuleTypeAndCallGoal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckStep/02. CheckModuleTypeAndCallGoal.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckStep/02. CheckModuleTypeAndCallGoal.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckStep/02. CheckModuleTypeAndCallGoal.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckStep/03. CheckModuleTypeAndCallGoal.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckStep/03. CheckModuleTypeAndCallGoal.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckStep/03. CheckModuleTypeAndCallGoal.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckStep/03. CheckModuleTypeAndCallGoal.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/05. CheckDirectoryLength.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/05. CheckDirectoryLength.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/05. CheckDirectoryLength.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/05. CheckDirectoryLength.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/06. CheckDirectoryLength.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/06. CheckDirectoryLength.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/06. CheckDirectoryLength.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/06. CheckDirectoryLength.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/07. CheckDirectoryLength.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/07. CheckDirectoryLength.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/07. CheckDirectoryLength.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/07. CheckDirectoryLength.pdb -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/08. CheckDirectoryLength.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/08. CheckDirectoryLength.dll -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckCallingGoal/08. CheckDirectoryLength.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ingig/FoodDiaryApp/HEAD/.build/events/CheckGoals/CheckCallingGoal/08. CheckDirectoryLength.pdb -------------------------------------------------------------------------------- /entry/llm/queryResultsSystem.txt: -------------------------------------------------------------------------------- 1 | You are a BI specialist recieving database results. 2 | You job is to take these results and respond user the user intent from his input. 3 | Give your response in raw text format. -------------------------------------------------------------------------------- /knowledge/llm/tableInfo.txt: -------------------------------------------------------------------------------- 1 | Following is Table scheme in Sqlite database 2 | 3 | Table: knowledge 4 | Columns: (id INTEGER PRIMARY KEY, info TEXT, created DATETIME DEFAULT (datetime('now'), type TEXT); 5 | 6 | -------------------------------------------------------------------------------- /knowledge/llm/deleteAssistant.txt: -------------------------------------------------------------------------------- 1 | === Database structure === 2 | %tableInfo% 3 | === Database structure === 4 | === Last 10 records in knowledge table === 5 | %knowledge% 6 | === Last 10 records in knowledge table === 7 | -------------------------------------------------------------------------------- /entry/llm/deleteAssistant.txt: -------------------------------------------------------------------------------- 1 | === Database structure === 2 | %tableInfo% 3 | === Database structure === 4 | === Last 10 records in food_entries table === 5 | %foodEntries% 6 | === Last 10 records in food_entries table === 7 | -------------------------------------------------------------------------------- /events/HandleError.goal: -------------------------------------------------------------------------------- 1 | HandleError 2 | - if %__LLM_Balance__% is not empty and %__LLM_Balance__% <= 0 then 3 | - call goal !SendMessage content='Just wanted to let you know that your balance is $0, you can purchase credts here %__LLM_PaymentUrl__%' 4 | - call goal !Start -------------------------------------------------------------------------------- /events/CheckBalance.goal: -------------------------------------------------------------------------------- 1 | CheckBalance 2 | - if %__LLM_Balance__% is not empty and %__LLM_Balance__% < 5*10^5 (can be lower then 0) then 3 | - call goal !SendMessage content='Just wanted to let you know that your balance is now below $0.5, you can purchase credts here %__LLM_PaymentUrl__%' -------------------------------------------------------------------------------- /entry/llm/tableInfo.txt: -------------------------------------------------------------------------------- 1 | Following is Table scheme in Sqlite database 2 | 3 | Table: food_entries 4 | Columns: (id BIGINT PRIMARY KEY, date TIMESTAMP NOT NULL, dish_name TEXT NOT NULL, total_weight NUMERIC, ingredients JSON, total_calories NUMERIC, emojis TEXT, carbs NUMERIC, fat NUMERIC, protein NUMERIC); 5 | 6 | -------------------------------------------------------------------------------- /events/Events.goal: -------------------------------------------------------------------------------- 1 | Events 2 | - before each step, include private goals,call !SendDebug, only in debug mode 3 | - before goal ends, include private goals, call !SendDebug, only in debug mode 4 | - before goal 'Start', call !CheckBalance 5 | - on error , call !HandleError 6 | - on app start, call !LoadSystemSettings -------------------------------------------------------------------------------- /entry/llm/querySystem.txt: -------------------------------------------------------------------------------- 1 | You are a SQL specialist for SQLite database. 2 | 3 | %systemSettings% 4 | 5 | === Database structure === 6 | %tableInfo% 7 | === Database structure === 8 | 9 | Analyze the user intent from his input and construct a SQL statement from the provided Database structure that will answer his question. -------------------------------------------------------------------------------- /entry/llm/updateSystem.txt: -------------------------------------------------------------------------------- 1 | You are a SQL specialist for SQLite database. 2 | 3 | %systemSettings% 4 | 5 | Analyze the user intent from his input and construct a SQL statement that will update the values needed. 6 | 7 | Generate the UPDATE sql statement. 8 | Generate short explaination of what was updated in plain english 9 | -------------------------------------------------------------------------------- /entry/llm/updateResultSystem.txt: -------------------------------------------------------------------------------- 1 | %systemSettings% 2 | 3 | Following sql statement was executed. 4 | === sql == 5 | %sql% 6 | === sql == 7 | 8 | It was initated by this statment from the user 9 | === User statement === 10 | %userInput% 11 | === User statement === 12 | 13 | Write in short text on what was updated. 14 | Dont mention SQL since non technical person will read this -------------------------------------------------------------------------------- /events/LoadSystemSettings.goal: -------------------------------------------------------------------------------- 1 | LoadSystemSettings 2 | - select info from knowledge where type='general', write to %systemKnowlegde% 3 | - set %systemSettings% = " 4 | Database is Sqlite 5 | Use %Settings.Measurement% system 6 | User language(s) is: %Settings.Languages% 7 | === Knowledge provide by user to help === 8 | %systemKnowlegde% 9 | === Knowledge provide by user to help ===" -------------------------------------------------------------------------------- /knowledge/llm/insertSystem.txt: -------------------------------------------------------------------------------- 1 | Act as Nutritional specialist. You are learning a new fact about the user. 2 | This information will be stored in database and feeded back to LLM at later point. 3 | Format the user input, you can remove text such as "Learn", "add to knowledge". 4 | Just keep to the content that matters, do not remove numbers or change them. 5 | 6 | Define the type of knowledge, there are 2 types: 'macronutrients' and 'general' 7 | 8 | Be concise -------------------------------------------------------------------------------- /knowledge/llm/updateSystem.txt: -------------------------------------------------------------------------------- 1 | You are a SQL specialist for SQLite database. 2 | 3 | %systemSettings% 4 | 5 | %tableInfo% 6 | 7 | Analyze the user intent from his input and construct a SQL statement that will update the values needed. 8 | 9 | Generate the UPDATE sql statement, if no updated is need set sql as null 10 | Generate short explaination of what was updated in plain english 11 | 12 | Define the type of knowledge, there are 2 types: 'macronutrients' and 'general' 13 | -------------------------------------------------------------------------------- /entry/llm/deleteSystem.txt: -------------------------------------------------------------------------------- 1 | You are a SQL specialist for SQLite. Analyze the user intent from his input and construct a SQL statement that will delete what he requests. 2 | 3 | %systemSettings% 4 | 5 | Generate the DELETE sql statement 6 | Generate short explaination of what was deleted in plain english, include the name of the dish deleted. 7 | Do not mention SQL since the explaination is for non-tech people. 8 | 9 | When user states something like, 'remove my last entry', it means that he wants to remove the last entry he added to the database, so the newest entry. -------------------------------------------------------------------------------- /knowledge/Delete.goal: -------------------------------------------------------------------------------- 1 | Delete 2 | - call GetKnowledge 3 | - read llm/tableInfo.txt, into %tableInfo% 4 | - read file llm/deleteSystem.txt, load vars, %system% 5 | - read file llm/deleteAssistant.txt, load vars, %assistant% 6 | - [llm] system: %system% 7 | assistant: %assistant% 8 | logger:warning 9 | user: %userInput% 10 | scheme: {explain:string, sql:string|null} 11 | - write out 'sql:%sql% - explain:%explain%' 12 | - if %sql% is not null then 13 | - execute delete sql %sql% 14 | - append to %output% = %explain% 15 | 16 | 17 | -------------------------------------------------------------------------------- /knowledge/llm/deleteSystem.txt: -------------------------------------------------------------------------------- 1 | You are a SQL specialist for SQLite. 2 | Analyze the user intent from his input and construct a SQL statement that will delete what he requests. 3 | 4 | %systemSettings% 5 | 6 | Generate the DELETE sql statement 7 | Generate short explaination of what was deleted in plain english, include the name of the dish deleted. 8 | Do not mention SQL since the explaination is for non-tech people. 9 | 10 | When user states something like, 'remove my last entry', it means that he wants to remove the last entry he added to the database, so the newest entry. -------------------------------------------------------------------------------- /symtpoms/Query.goal: -------------------------------------------------------------------------------- 1 | SymptomsQuery 2 | - write out 'Doing SymptomsQuery' 3 | - read llm/symptomsSystem.txt, into %symptomsSystem% 4 | - select * from (select * from food_entries order by id desc limit 10) order by id, write to %foodEntries% 5 | - select * from (select * from symptoms order by id desc limit 10) order by id, write to %symptoms% 6 | - read llm/symptonsAssistant.txt, into %symptomsAssistant% 7 | - [llm] system: %symptomsSystem% 8 | assistant: %symptomsAssistant% 9 | user: %userInput% 10 | write to %response% 11 | - append to %output% = %response% -------------------------------------------------------------------------------- /entry/Update.goal: -------------------------------------------------------------------------------- 1 | Update 2 | - write out 'Doing Update' 3 | - select * from (select * from food_entries order by id desc limit 10) order by id, write to %foodEntries% 4 | - read llm/tableInfo.txt, write to %tableInfo% 5 | - read llm/updateSystem.txt, write to %updateSystem% 6 | - read llm/updateAssistant.txt, write to %updateAssistant%, load vars 7 | - [llm] system:%updateSystem% 8 | assistant: %updateAssistant% 9 | user: %userInput% 10 | scheme: {explain:string, sql:string} 11 | - write out '%sql% - %explain%' 12 | - execute sql update, sql=%sql% 13 | - append to %output% = %explain% -------------------------------------------------------------------------------- /entry/Delete.goal: -------------------------------------------------------------------------------- 1 | Delete 2 | - write out 'Doing Delete' 3 | - select * from (select * from food_entries order by id desc limit 10) order by id, write to variable %foodEntries% 4 | - read llm/tableInfo.txt, write to %tableInfo% 5 | - read llm/deleteSystem.txt, load vars, write to %deleteSystem% 6 | - read llm/deleteAssistant.txt, load vars, write to %deleteAssistant% 7 | - [llm] system:%deleteSystem% 8 | assistant: %deleteAssistant% 9 | user:%userInput% 10 | scheme: {explain:string, sql:string} 11 | - write out 'sql:%sql% - explain:%explain%' 12 | - execute sql %sql% 13 | - append to %output% = %explain% -------------------------------------------------------------------------------- /.build/Start/call goal %goalName%/00. Goal.pr: -------------------------------------------------------------------------------- 1 | { 2 | "GoalName": "call goal %goalName%", 3 | "Comment": null, 4 | "GoalSteps": [], 5 | "Description": null, 6 | "Visibility": 0, 7 | "GoalFileName": "Start.goal", 8 | "RelativeGoalPath": "\\Start.goal", 9 | "RelativeGoalFolderPath": "\\", 10 | "RelativePrPath": ".build\\Start\\call goal %goalName%\\00. Goal.pr", 11 | "RelativePrFolderPath": ".build\\Start\\call goal %goalName%", 12 | "BuilderVersion": "0.1.0.6", 13 | "GoalApiInfo": null, 14 | "Injections": [], 15 | "Signature": null, 16 | "Hash": "7f711a65aed57988283f6ba1b60d6dcf96b83b99b6138e832948fee80240e90f" 17 | } -------------------------------------------------------------------------------- /events/SendDebug.goal: -------------------------------------------------------------------------------- 1 | SendDebug 2 | - post http://localhost:60877/ 3 | data: { 4 | goal:"%__GOAL__%", 5 | step:"%__STEP__%", 6 | event:"%__Event__%", 7 | isHttpRequest:"%__IsHttpRequest__%", 8 | stepIndex:%__StepIndex__%, 9 | instruction:%__Instruction__%, 10 | memoryStack:"%__memorystack__%", 11 | absolutePath:%__GOAL__.AbsoluteGoalPath%, 12 | exception:"%__Exception__%", 13 | } 14 | timeout 30 min 15 | write to %debugReponse% 16 | - if %debugReponse.go_to% is not null then call GoToLine line=%debugReponse.go_to% 17 | 18 | GoToLine 19 | - set %__StepIndex__% as %line% -------------------------------------------------------------------------------- /Setup.goal: -------------------------------------------------------------------------------- 1 | Setup 2 | - create table food_entries 3 | columns: date(datetime, not null), dish_name(string, not null), user_input(string), total_weight(number), 4 | ingredients(json), total_calories(number), carbs(number), fat(number), protein(number) 5 | , emojis(string) 6 | - create table symptoms, columns: 7 | food_entry_id(foreign key to food_entries) 8 | description(string, not null) 9 | created(datetime, default current date) 10 | - create table knowledge, columns: info(string), created(datetime, now) 11 | - add columns to food_entries 12 | fiber(number), net_carbs(number) 13 | - add column 'type'(string) to table knowledge 14 | - call goal knowledge/Update userInput='Update all knowledge in database with correct type' -------------------------------------------------------------------------------- /entry/Query.goal: -------------------------------------------------------------------------------- 1 | Query 2 | - write out 'Doing Query' 3 | - read llm/tableInfo.txt, write to %tableInfo% 4 | - read llm/querySystem.txt, load vars, write to %querySystem% 5 | - [llm] system:%querySystem% 6 | user: %userInput% 7 | scheme: {sql:string, error:number|null, error_description:string|null} 8 | - if %error% is not null, then call !Chat, else call DoResults 9 | 10 | DoResults 11 | - do select on db, %sql%, write to %results% 12 | - read llm/queryResultsSystem.txt, write to %queryResultsSystem% 13 | - [llm] system:%queryResultsSystem% 14 | assistant: '=== Database results ===\n%results%\n=== Database results ===' 15 | user: %userInput% 16 | model: 'gpt-3.5-turbo', 17 | write to %message% 18 | - append to %output% = %message% -------------------------------------------------------------------------------- /FirstTimeSetup.goal: -------------------------------------------------------------------------------- 1 | FirstTimeSetup 2 | - ask 'Do you want to use metric or imperial measurements?', options 'metric', 'imperial', write to %newMeasurement% 3 | - ask 'In what languages will you write in, you can have multiple languages', write to %newLanguages% 4 | - ask 'Do you want to set a Nostr address? (This allows you to send diary on your phone): yes or no', options 'yes' or 'no', write to %setNostr% 5 | - if %setNostr% = 'yes' then 6 | - ask 'Please enter your Nostr address:', must start with 'npub', write to %newNostrAddress% 7 | - set %Settings.Measurement%=%newMeasurement% 8 | - set %Settings.NostrAddress%=%newNostrAddress% 9 | - set %Settings.Languages%=%newLanguages% 10 | - send message to %Settings.NostrAddress%, content: 'Hi, I am your food diary. Send me your entries' -------------------------------------------------------------------------------- /knowledge/llm/updatePrevSystem.txt: -------------------------------------------------------------------------------- 1 | User just added a knowledge to the system 2 | 3 | %systemSettings% 4 | 5 | === last food_entries === 6 | %foodEntries% 7 | === last food_entries === 8 | === table info for food_entries === 9 | Table: food_entries 10 | Columns: (id BIGINT PRIMARY KEY, date TIMESTAMP NOT NULL, dish_name TEXT NOT NULL, total_weight NUMERIC, ingredients JSON, total_calories NUMERIC, emojis TEXT, carbs NUMERIC, fat NUMERIC, protein NUMERIC); 11 | === table info for food_entries === 12 | 13 | Give short explaination of your change, do not mention SQL as this is for non tech person, be concise 14 | Use this new information and see if you need update any food entries in the food_entries table 15 | Generate the UPDATE statement sql for sqlite if there anything to update 16 | -------------------------------------------------------------------------------- /knowledge/Update.goal: -------------------------------------------------------------------------------- 1 | Update 2 | - set %knowledgeText% = "" 3 | - read llm/tableInfo.txt, %tableInfo% 4 | - read llm/updateSystem.txt, %system% 5 | - call GetKnowledge 6 | - [llm] system:%system% 7 | assistant: %knowledge% 8 | user: %userInput% 9 | logger:warning 10 | scheme: {explain:string, sqls:string[]|null} 11 | - if %sqls% is null, call DontKnowKnowledge, else ExecuteSqls 12 | 13 | DontKnowKnowledge 14 | - foreach %knowledge% call !CreateKnowledgeText 15 | - append to %output% = "Couldn't find anything matching '%userInput%' in my knowledge 16 | 17 | This is my knowledge: 18 | %knowledgeText% 19 | " 20 | ExecuteSqls 21 | - foreach %sqls% call UpdateKnowledge item=%sql% 22 | 23 | UpdateKnowledge 24 | - execute update %sql% 25 | - append %output% = %explain% 26 | 27 | CreateKnowledgeText 28 | - append %knowledgeText% = %item.info% -------------------------------------------------------------------------------- /knowledge/Insert.goal: -------------------------------------------------------------------------------- 1 | Insert 2 | - read llm/insertSystem.txt, into %system% 3 | - [llm] system:%system% 4 | user: %userInput% 5 | scheme: {info:string, type:string} 6 | write to %info% 7 | - insert into knowledge, %info%, %type% 8 | - call goal GetKnowledge 9 | - select * from food_entries order by id desc limit 10, write to %foodEntries% 10 | - read llm/updatePrevSystem.txt, load vars, into %system% 11 | - [llm] system:%system% 12 | user:%info% 13 | logger: warning 14 | scheme:{explain:string, sqls:string[]} 15 | write to %updateCommand% 16 | - write out %updateCommand% 17 | - foreach %updateCommand.sqls% call UpdateFoodEntry 18 | - append to string %output% = "👍 Got it - %info%" 19 | - if %sqls% is not empty then 20 | - append to string %output% = %updateCommand.explain% 21 | 22 | UpdateFoodEntry 23 | - execute update sql=%item% -------------------------------------------------------------------------------- /Chat.goal: -------------------------------------------------------------------------------- 1 | Chat 2 | - write out 'Doing chat' 3 | - select * from (select * from food_entries order by id desc, limit 10) order by id, write results into %food_entries% 4 | - select * from (select * from symptoms order by id desc, limit 10) order by id, into %symptoms% 5 | - set default value for %chatAssistant% = "" 6 | - [code] make sure max length of %chatAssistant% is 2000 characters, 7 | if it is more, trim from second 'user:' 8 | if second user is not found, just trim it to 2000 chars 9 | write to %chatAssistant% 10 | - read llm/chatSystem.txt, to %chatSystem%, load vars 11 | - [llm] system:%chatSystem% 12 | assistant: %chatAssistant% 13 | user:%userInput% 14 | write to %chatResponse% 15 | - append 'user:%userInput%' to %chatAssistant% 16 | - append 'assistant:%chatResponse%' to %chatAssistant% 17 | - append to string %output% = %chatResponse% 18 | -------------------------------------------------------------------------------- /draftidea.txt: -------------------------------------------------------------------------------- 1 | I want to create a food diary app, on first time app starts, ask user if he want to use metric or emprical measurements, then ask if he wants to set Nostr address(explain what that is). Then app starts by displaying current total calories for the day, then he asks user what he ate, if he types in 'list', then show list of last 5 days what was eaten, if he types 'settings', show settings available and possiblity to change them, else take the content and ask llm analyze it to structure it in the following way. 2 | 3 | { 4 | "date": "2024-04-14", 5 | "dish": { 6 | "name": string, 7 | "totalWeight": number, 8 | "ingredients": [ 9 | {"name": string, "quantity": number, "calories": number}, 10 | 11 | ], 12 | "totalCalories": number 13 | }, 14 | "notes": string 15 | } 16 | 17 | The app needs to store this into a database. The app should listen for new message if nostr address was set, when a new message comes inn, it should call again (reuse the same goal) the llm to take the content analyze it and store in db -------------------------------------------------------------------------------- /llm/chatSystem.txt: -------------------------------------------------------------------------------- 1 | Act as a Nutritional specialist for a food diary. Be concise. 2 | 3 | %systemSettings% 4 | 5 | These are my 10 last food entries 6 | === food entries === 7 | %food_entries% 8 | === food entries === 9 | 10 | These are my last symtoms 11 | === last symtoms === 12 | %symptoms% 13 | === last symtoms === 14 | === help on what user can do in this app === 15 | add food entries, just type it in your own language, 'ate sandwich with ham and cheese' 16 | add symtpoms, e.g. 'had stomach pain for 30 min' 17 | 18 | update entries, e.g. 'add tomato to my last meal' 19 | delete entries, e.g. 'last meal was wrong, lets remove it' 20 | 21 | query the data, e.g. 'what are my stats for today', 'how much protein have I ingested', 'how are my symptoms related' 22 | 23 | add knowledge (teach the app), e.g. 'I am 45 year old woman', 'I am on keto diet', '100 gr of cocktail sauce is 3gr of carbs' 24 | update knowledge, remove knowledge 25 | 26 | General chat 27 | === help on what you can in this app === 28 | 29 | Use those entries to help answer the user -------------------------------------------------------------------------------- /entry/llm/insertSystem.txt: -------------------------------------------------------------------------------- 1 | Act as Nutritional specialist. 2 | Analyze the food entry from user input for a food diary and break down the macronutrients for each food. 3 | 4 | %systemSettings% 5 | 6 | When user does not specify quantity or weight, always assume it is for one person that fits that meal type. Make up the missing numbers but be realistic. 7 | 8 | Use your knowledge as LLM to figure out the macronutrients information about ingredients 9 | ONLY WHEN ALL macronutrients is 0 create text for missing_macronutrients_info property. 10 | 11 | date property is usually current date and time unless specified by user 12 | Current datetime is %Now% 13 | %messageSent% 14 | 15 | name of dish should be created from the content of user entry 16 | Macronutrients that you should define are, protein, fat, carbs, fiber, net_carbs 17 | select emojis that fits the food, limit to max 5 emojis 18 | 19 | 20 | ### last 10 food entries - newest first ### 21 | %foodEntries% 22 | ### last 10 food entries - newest first ### 23 | 24 | ### knowledge added by user ### 25 | %foodKnowledge% 26 | ### knowledge added by user ### -------------------------------------------------------------------------------- /events/CheckGoals.goal: -------------------------------------------------------------------------------- 1 | CheckGoals 2 | - write out "Validating goals called" 3 | - get content of all '00. Goal.pr' files, in ../, include subfolder, write into %goalFiles% 4 | - go throug %goalFiles%, call !CheckGoal item=%goal% 5 | - if %missingGoals% is not empty then, call ShowMissingGoals, else ShowAllValid 6 | 7 | CheckGoal 8 | - go through %goal.Content.GoalSteps%, call CheckStep item=%step% 9 | 10 | CheckStep 11 | - if %step.ModuleType%(to string) == "PLang.Modules.CallGoalModule" then call CheckCallingGoal 12 | 13 | CheckCallingGoal 14 | - read file /%step.RelativePrPath%, into %stepPr% 15 | - set string var %goalToCall% = %stepPr.Action.Parameters[1].Value.ToString().Replace("!", "")% 16 | - if %goalToCall% != "String" then 17 | - search in /.build/ for all dirs with name '%goalToCall%' , write to %dirs% 18 | - create list %missingGoals% = [] 19 | - if %dirs.Length% == 0 then 20 | - append to %missingGoals% = '%goal.GoalName% - %step.Text% - Missing goal: %goalToCall%' 21 | 22 | ShowMissingGoals 23 | - write out error '%missingGoals%' 24 | 25 | ShowAllValid 26 | - write out 'All goals being called exist' -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Ingi Gauti 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Settings.goal: -------------------------------------------------------------------------------- 1 | Settings 2 | - write out 'Current settings: 3 | Measurement - %Settings.Measurement% 4 | Languages - %Settings.Languages% 5 | Nostr address - %Settings.NostrAddress%' 6 | - ask '\nWhat would you like to do? 7 | 8 | 1. Change measurement from %Settings.Measurement% 9 | 2. Change Nostr address %Settings.NostrAddress% 10 | 3. Change Languages from %Settings.Languages% 11 | 4. Delete entries from diary 12 | 5. Back to start", must be number 1-5, write to %answer% 13 | - if %answer% == 1, call ChangeMeasurement 14 | - if %answer% == 2, call ChangeAddress 15 | - if %answer% == 3, call ChangLanguages 16 | - if %answer% == 4, call DeleteEntry 17 | - if %answer% == 5, call Start 18 | - call !Start 19 | 20 | ChangeMeasurement 21 | - ask, 'What are your measurements in, metric or imperial?', options 'metric', 'imperial', write to %newMeasurement% 22 | - set Settings.Measurement%=%newMeasurement% 23 | 24 | ChangeAddress 25 | - ask, 'What is the new nostr address? You current is %Settings.NostrAddress%', must start with 'npub', write to %newAddress% 26 | - set %Settings.NostrAddress%=%newAddress% 27 | - send message to %newAddress%, content: 'Hi, I am your food diary' 28 | 29 | ChangLanguages 30 | - ask 'In what languages will you write in, you can have multiple languages', write to %newLanguages% 31 | - set %Settings.Languages%=%newLanguages% 32 | 33 | DeleteEntry 34 | - select * from food_entries order by id desc, write to %entries% 35 | - foreach %entries% call !ShowEntryToDelete 36 | - ask 'What entry would you like to delete? (0 to exit)', must be number, write to %entryId% 37 | - if %entryId > 0 then 38 | - delete from food_entries where id=%entryId% 39 | 40 | 41 | ShowEntryToDelete 42 | - write out '%item.id% - %item.date%, Dish: %item.dish_name%, Calories: %item.total_calories%' -------------------------------------------------------------------------------- /Start.goal: -------------------------------------------------------------------------------- 1 | Start 2 | - set var %userInput% = "", %output% = "" 3 | - if %Settings.Measurement% is empty, then call !FirstTimeSetup 4 | - if %Settings.NostrAddress% is not empty then call ListenToMessages 5 | - call !ShowTotalCalories 6 | - ask '\n\n ======== My food diary ======== 7 | You can send me what you ate today, you can also do other stuff 8 | 9 | Type in: 10 | 'settings' to view/change settings 11 | how many calories have I eating in last week 12 | how much protein have I had today 13 | add tomato sauce to last meal 14 | delete my last entry 15 | 16 | What did you eat today?', write to %userInput% 17 | - if %userInput% is not empty, then call !DoUserInput 18 | - call !Start 19 | 20 | DoUserInput 21 | - if %userInput% = 'settings'(ignore case) then !Settings, else call !HandleUserInput 22 | 23 | 24 | ListenToMessages 25 | - load public message address, write to %messageAddress% 26 | - write out 'Send me message on: %messageAddress%' 27 | - listen for new message from %Settings.NostrAddress%, 28 | call !HandleMessage content=%userInput%, event=%event% 29 | 30 | HandleMessage 31 | - if %userInput% is not empty then 32 | - set %IsMessage%=true 33 | - call !HandleUserInput, on error call !Start 34 | - set %IsMessage%=false 35 | 36 | HandleUserInput 37 | - call goal !LoadSystemSettings 38 | - read llm/chooseGoalSystem.txt, load vars, write to %chooseGoalSystem% 39 | - [llm] system: %chooseGoalSystem% 40 | user: %userInput% 41 | logger: warning 42 | scheme: {plan:string, goals:[name:string, newUserInput:string]} 43 | write to %plan% 44 | - write out %plan% 45 | - foreach %plan.goals% call ExecuteGoal 46 | - call goal SendMessage content=%output% 47 | 48 | ExecuteGoal 49 | - write out 'calling %item.name% - content: %item.newUserInput%' 50 | - call goal %item.name% userInput=%item.newUserInput% 51 | 52 | ShowTotalCalories 53 | - select sum(total_calories), 0 if null, round with 0 decimal, as totalCalories from food_entries where date(date)=date('now') 54 | return 1 row 55 | write to %totalCalories% 56 | - write out '\nTotal calories for today: %totalCalories%' -------------------------------------------------------------------------------- /llm/chooseGoalSystem.txt: -------------------------------------------------------------------------------- 1 | You are receiving a user input for a food diary, you job is to select the correct goal(s) to process the user intent. 2 | 3 | Order of execution of the goals are important. 4 | Create a plan on the execution from the user input 5 | Create list (1 or more) of goals to call and rewrite the user input to fit that goal 6 | 7 | %systemSettings% 8 | 9 | --- Available goals --- 10 | GoalName: /entry/Insert 11 | Description: User adds a new entry into the database, it is general statment of food, such as 12 | 'fish 200gr, brocoli, cauliflower', 'hamburger with cheese, bacon and fries, coke'. 13 | 14 | GoalName: /entry/Query 15 | Description: Used for running a sql query on the database, this could to apply to such statements as 16 | 'what are my last meals', 'what are my total calories today' 17 | 18 | GoalName: /entry/Update 19 | Description: Allows the user to update his data, this could to apply to such statements as 20 | 'change the meat dinner to 500gr', 'add tomato sauce to my last meal' 21 | 22 | GoalName: /entry/Delete 23 | Description: Allows the user to delete entries from the database, this could to apply to such statements as 24 | 'remove my last meal entry', 'delete everything from before 5 days ago' 25 | 26 | GoalName: /symtoms/Insert 27 | Description: user is describing a symptom, such as 28 | 'stomach pain, for 1 hour', 'dizziness 30 min after eating' 29 | 30 | GoalName: /symtpomps/Query 31 | Description: user is asking about Symptoms, such as 'what can you tell me about my symtpoms', 'are my symtpomps point to something' 32 | 33 | GoalName: /knowledge/Insert 34 | Description: user is teaching the system something to learn, this can me shortcut to often used food, information about the user such as gender, age, type of diet. It can be macronutrients about specific food, such as carbs, fats, proteins 35 | 36 | GoalName: /knowledge/Update 37 | Description: user is updating prior knowledge or something that he taught this software to learn. 38 | 39 | GoalName: /knowledge/Delete 40 | Description: user want to remove a knowledge or learned item from the system. 41 | 42 | GoalName: /knowledge/Query 43 | Description: user ask what you know or have learned 44 | 45 | GoalName: Chat 46 | Description: User wants to have a general with food specialist chat. 47 | 48 | --- Available goals --- 49 | -------------------------------------------------------------------------------- /entry/Insert.goal: -------------------------------------------------------------------------------- 1 | Insert 2 | - write out 'Doing Insert' 3 | - set string var %messageSent% = '' 4 | - if %event% is not empty then 5 | - set %messageSent% = "This user request was was created on %event.CreatedAt%, take that into account when determining date property" 6 | - set %event% = null 7 | - write out 'Doing message:%userInput%' 8 | - select info from knowledge where type='macronutrients', write to %foodKnowledge% 9 | - select * from (select * from food_entries order by id desc limit 10) order by id, write to %foodEntries% 10 | - read llm/insertSystem.txt, load vars, to %insertSystem% 11 | - [llm] system: %insertSystem% 12 | user: %userInput% 13 | scheme: { 14 | "date": datetime, 15 | "dish": { 16 | "name": string, 17 | "totalWeight": number, 18 | "ingredients": [ 19 | {"name": string, "quantity": number, "calories": number, "carbs":number, "fiber": number, "net_carb":number,"fat":number,"protein":number} 20 | ], 21 | "totalCarbs":number, 22 | "totalNetCarbs":number, 23 | "totalFiber":number, 24 | "totalFat":number, 25 | "totalProtein":number, 26 | "totalCalories": number 27 | }, 28 | "emojis": string 29 | "missing_macronutrients_info":string|null 30 | } 31 | logger: warning 32 | write to %foodEntry% 33 | - if %foodEntry.dish.name% = "unknown", call CouldNotDoEntry, call InsertEntry 34 | 35 | InsertEntry 36 | - insert into food_entries 37 | date=%foodEntry.date%, %userInput%, dish_name=%foodEntry.dish.name%, 38 | total_weight=%foodEntry.dish.totalWeight%, ingredients=%foodEntry.dish.ingredients%, 39 | carbs=%foodEntry.dish.totalCarbs%, net_carbs=%foodEntry.dish.totalNetCarbs%, fiber=%foodEntry.dish.totalFiber%, 40 | fat=%foodEntry.dish.totalFat%, 41 | protein=%foodEntry.dish.totalProtein%, total_calories=%foodEntry.dish.totalCalories%, 42 | emojis=%foodEntry.emojis% 43 | - select everyting from today in food_entries 44 | and calculate the sum of total calories as tcal, total net carbs as tcar, total proteins as tp, 45 | return 1 row 46 | - append to %output% = "%foodEntry.emojis% - Calories: %foodEntry.dish.totalCalories% 47 | Protein: %foodEntry.dish.totalProtein% 48 | Net Carbs: %foodEntry.dish.totalNetCarbs% (%foodEntry.dish.totalCarbs% / %foodEntry.dish.totalFiber%) 49 | Fat: %foodEntry.dish.totalFat% 50 | == Total today == 51 | KCal: %tcal% 52 | Net carb: %tcar% 53 | Protein:%tp% 54 | == Total today == 55 | %foodEntry.missing_macronutrients_info%" 56 | 57 | CouldNotDoEntry 58 | - append to %output% = %foodEntry.missing_macronutrients_info% -------------------------------------------------------------------------------- /.build/knowledge/Delete/08. ExecuteDeleteSQL.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "Warning": "Direct execution of user-provided SQL without parameters or validation can lead to SQL injection vulnerabilities.", 4 | "FunctionName": "Delete", 5 | "Parameters": [ 6 | { 7 | "Type": "String", 8 | "Name": "sql", 9 | "Value": "%sql%" 10 | } 11 | ], 12 | "ReturnValue": null 13 | }, 14 | "Text": "execute delete sql %sql%", 15 | "Reload": false, 16 | "LlmRequest": { 17 | "temperature": 0.0, 18 | "top_p": 0.0, 19 | "frequencyPenalty": 0.0, 20 | "presencePenalty": 0.0, 21 | "maxLength": 4000, 22 | "llmResponseType": "json", 23 | "scheme": "{\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 24 | "type": "PLang.Modules.DbModule.Builder", 25 | "promptMessage": [ 26 | { 27 | "role": "system", 28 | "content": [ 29 | { 30 | "type": "text", 31 | "text": "Map user command to this c# function: \r\n\r\n## csharp function ##\r\nInt32 Delete(String sql, List()? SqlParameters = null)\r\n## csharp function ##\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%.\r\nSqlParameters is List of ParameterInfo(string ParameterName, string VariableNameOrValue, string TypeFullName)\r\nTypeFullName is Full name of the type in c#, System.String, System.Double, etc.\r\nParameter @id MUST be type System.Int64\r\n\r\nIf table name is a variable, keep the variable in the sql statement\r\nYou MUST generate a valid sql statement for SQLite.\r\nYou MUST provide SqlParameters if SQL has @parameter.\r\n" 32 | }, 33 | { 34 | "type": "text", 35 | "text": "You MUST respond in JSON, scheme:\r\n {\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 36 | } 37 | ] 38 | }, 39 | { 40 | "role": "assistant", 41 | "content": [ 42 | { 43 | "type": "text", 44 | "text": "# examples #\r\n\"delete from tableX\" => sql: \"DELETE FROM tableX\", warning: Missing WHERE statement can affect rows that should not\r\n\"delete tableB where id=%id%\" => sql: \"DELETE FROM tableB WHERE id=@id\", warning: null\r\n\"delete * from %table% WHERE %name% => sql: \"DELETE FROM %table% WHERE name=@name\"\r\n# examples #" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "user", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "execute delete sql %sql%" 54 | } 55 | ] 56 | } 57 | ], 58 | "model": "gpt-4-turbo", 59 | "caching": true, 60 | "RawResponse": "{\n \"Warning\": \"Direct execution of user-provided SQL without parameters or validation can lead to SQL injection vulnerabilities.\",\n \"FunctionName\": \"Delete\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"%sql%\"\n }\n ]\n}" 61 | }, 62 | "RunOnBuild": false 63 | } -------------------------------------------------------------------------------- /.build/entry/Delete/08. ExecuteSQL.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Execute", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "sql", 8 | "Value": "%sql%" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "execute sql %sql%", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.DbModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Generate the SQL statement from user command. \r\nThe SQL statement MUST be a valid SQL statement for SQLite. \r\nMake sure to use correct data types that match SQLite\r\nYou MUST provide Parameters if SQL has @parameter.\r\n" 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available defined in csharp ##\r\nvoid CreateDataSource(String name, String? dbType, Boolean? setAsDefaultForApp = False, Boolean? keepHistoryEventSourcing = False) \nvoid SetDataSouceName(String name) \nvoid BeginTransaction() \nvoid EndTransaction() \nvoid LoadExtension(String fileName, String? procName) \nString GetDatabaseStructure() // Returns tables and views in database with the columns description. \nInt32 Execute(String sql) \nvoid CreateTable(String sql) \nObject SelectOneRow(String sql, List`1? SqlParameters) \nList`1 Select(String sql, List`1? SqlParameters) \nInt32 Update(String sql, List`1? SqlParameters) \nInt32 Delete(String sql, List`1? SqlParameters) \nInt32 Insert(String sql, List`1? SqlParameters) // Basic insert statement. Will return affected row count. \nObject InsertAndSelectIdOfInsertedRow(String sql, List`1? SqlParameters) // Insert statement that will return the id of the inserted row. Use only if user requests the id. \nInt32 InsertBulk(String tableName, List`1 items) // Insert a list(bulk) into database, return number of rows inserted. \nString GetAdditionalSystemErrorInfo() \nString GetAdditionalAssistantErrorInfo() \n\r\n## functions available ends ##\r\n" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "execute sql %sql%" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Execute\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"%sql%\"\n }\n ]\n}" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/actions/Delete/09. ExecuteSQL.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Execute", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "sql", 8 | "Value": "%sql%" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "execute sql %sql%", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.DbModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Generate the SQL statement from user command. \r\nThe SQL statement MUST be a valid SQL statement for PostgreSQL. \r\nMake sure to use correct data types that match PostgreSQL\r\nYou MUST provide Parameters if SQL has @parameter.\r\n" 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available defined in csharp ##\r\nvoid CreateDataSource(String name, String? dbType, Boolean? setAsDefaultForApp = False, Boolean? keepHistoryEventSourcing = False) \nvoid SetDataSouceName(String name) \nvoid BeginTransaction() \nvoid EndTransaction() \nvoid LoadExtension(String fileName, String? procName) \nString GetDatabaseStructure() // Returns tables and views in database with the columns description. \nInt32 Execute(String sql) \nvoid CreateTable(String sql) \nObject SelectOneRow(String sql, List`1? SqlParameters) \nList`1 Select(String sql, List`1? SqlParameters) \nInt32 Update(String sql, List`1? SqlParameters) \nInt32 Delete(String sql, List`1? SqlParameters) \nInt32 Insert(String sql, List`1? SqlParameters) // Basic insert statement. Will return affected row count. \nObject InsertAndSelectIdOfInsertedRow(String sql, List`1? SqlParameters) // Insert statement that will return the id of the inserted row. Use only if user requests the id. \nInt32 InsertBulk(String tableName, List`1 items) // Insert a list(bulk) into database, return number of rows inserted. \nString GetAdditionalSystemErrorInfo() \nString GetAdditionalAssistantErrorInfo() \n\r\n## functions available ends ##\r\n" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "execute sql %sql%" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Execute\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"%sql%\"\n }\n ]\n}" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/Settings/DeleteEntry/05. DeleteFoodEntry.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "Warning": null, 4 | "FunctionName": "Delete", 5 | "Parameters": [ 6 | { 7 | "Type": "String", 8 | "Name": "sql", 9 | "Value": "DELETE FROM food_entries WHERE id=@id" 10 | }, 11 | { 12 | "Type": "List", 13 | "Name": "SqlParameters", 14 | "Value": [ 15 | { 16 | "ParameterName": "@id", 17 | "VariableNameOrValue": "%entryId%", 18 | "TypeFullName": "System.Int64" 19 | } 20 | ] 21 | } 22 | ], 23 | "ReturnValue": null 24 | }, 25 | "Text": "delete from food_entries where id=%entryId%", 26 | "Reload": false, 27 | "LlmRequest": { 28 | "temperature": 0.0, 29 | "top_p": 0.0, 30 | "frequencyPenalty": 0.0, 31 | "presencePenalty": 0.0, 32 | "maxLength": 4000, 33 | "llmResponseType": "json", 34 | "scheme": "{\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 35 | "type": "PLang.Modules.DbModule.Builder", 36 | "promptMessage": [ 37 | { 38 | "role": "system", 39 | "content": [ 40 | { 41 | "type": "text", 42 | "text": "Map user command to this c# function: \r\n\r\n## csharp function ##\r\nInt32 Delete(String sql, List()? SqlParameters = null)\r\n## csharp function ##\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%.\r\nSqlParameters is List of ParameterInfo(string ParameterName, string VariableNameOrValue, string TypeFullName)\r\nTypeFullName is Full name of the type in c#, System.String, System.Double, etc.\r\nParameter @id MUST be type System.Int64\r\n\r\nIf table name is a variable, keep the variable in the sql statement\r\nYou MUST generate a valid sql statement for PostgreSQL.\r\nYou MUST provide SqlParameters if SQL has @parameter.\r\n" 43 | }, 44 | { 45 | "type": "text", 46 | "text": "You MUST respond in JSON, scheme:\r\n {\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 47 | } 48 | ] 49 | }, 50 | { 51 | "role": "assistant", 52 | "content": [ 53 | { 54 | "type": "text", 55 | "text": "# examples #\r\n\"delete from tableX\" => sql: \"DELETE FROM tableX\", warning: Missing WHERE statement can affect rows that should not\r\n\"delete tableB where id=%id%\" => sql: \"DELETE FROM tableB WHERE id=@id\", warning: null\r\n\"delete * from %table% WHERE %name% => sql: \"DELETE FROM %table% WHERE name=@name\"\r\n# examples #" 56 | }, 57 | { 58 | "type": "text", 59 | "text": "### food_entries table info starts ###\n[{\"name\":\"id\",\"type\":\"BIGINT\"},{\"name\":\"date\",\"type\":\"TIMESTAMP\"},{\"name\":\"dish_name\",\"type\":\"TEXT\"},{\"name\":\"total_weight\",\"type\":\"NUMERIC\"},{\"name\":\"ingredients\",\"type\":\"JSON\"},{\"name\":\"total_calories\",\"type\":\"NUMERIC\"},{\"name\":\"notes\",\"type\":\"TEXT\"}]\n### table info ends ###" 60 | } 61 | ] 62 | }, 63 | { 64 | "role": "user", 65 | "content": [ 66 | { 67 | "type": "text", 68 | "text": "delete from food_entries where id=%entryId%" 69 | } 70 | ] 71 | } 72 | ], 73 | "model": "gpt-4-turbo", 74 | "caching": true, 75 | "RawResponse": null 76 | }, 77 | "RunOnBuild": false 78 | } -------------------------------------------------------------------------------- /.build/Setup/05. AddColumnToTable.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "CreateTable", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "sql", 8 | "Value": "ALTER TABLE knowledge ADD COLUMN type TEXT;" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "add column 'type'(string) to table knowledge", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.DbModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Map user command to this c# function: \r\n\r\n## csharp function ##\r\nvoid CreateTable(String sql) \r\n## csharp function ##\r\n\r\nIf table name is a variable, keep the variable in the sql statement\r\nvariable is defined with starting and ending %, e.g. %filePath%.\r\nYou MUST generate a valid sql statement for SQLite.\r\nYou MUST add id to create statement.\r\nIf id is not defined then add id to the create statement. \r\nThe id MUST NOT be auto incremental, but is primary key.\r\nThe id should be datatype long/bigint/.. which fits SQLite.\r\n" 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nvoid CreateDataSource(String name, String? dbType, Boolean? setAsDefaultForApp = False, Boolean? keepHistoryEventSourcing = False) \nvoid SetDataSouceName(String name) \nvoid BeginTransaction() \nvoid EndTransaction() \nvoid LoadExtension(String fileName, String? procName) \nString GetDatabaseStructure() // Returns tables and views in database with the columns description. \nInt32 Execute(String sql) \nvoid CreateTable(String sql) \nObject SelectOneRow(String sql, List`1? SqlParameters) \nList`1 Select(String sql, List`1? SqlParameters) \nInt32 Update(String sql, List`1? SqlParameters) \nInt32 Delete(String sql, List`1? SqlParameters) \nInt32 Insert(String sql, List`1? SqlParameters) // Basic insert statement. Will return affected row count. \nObject InsertAndSelectIdOfInsertedRow(String sql, List`1? SqlParameters) // Insert statement that will return the id of the inserted row. Use only if user requests the id. \nInt32 InsertBulk(String tableName, List`1 items) // Insert a list(bulk) into database, return number of rows inserted. \nString GetAdditionalSystemErrorInfo() \nString GetAdditionalAssistantErrorInfo()\r\n## functions available ends ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "add column 'type'(string) to table knowledge" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "```json\n{\n \"FunctionName\": \"CreateTable\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"ALTER TABLE knowledge ADD COLUMN type TEXT;\"\n }\n ]\n}\n```" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/knowledge/Update/UpdateKnowledge/01. ExecuteSQLUpdate.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "Warning": "The variable %sql% should not be used directly in the SQL statement to prevent SQL injection risks.", 4 | "FunctionName": "Update", 5 | "Parameters": [ 6 | { 7 | "Type": "String", 8 | "Name": "sql", 9 | "Value": "%sql%" 10 | } 11 | ], 12 | "ReturnValue": null 13 | }, 14 | "Text": "execute update %sql%", 15 | "Reload": false, 16 | "LlmRequest": { 17 | "temperature": 0.0, 18 | "top_p": 0.0, 19 | "frequencyPenalty": 0.0, 20 | "presencePenalty": 0.0, 21 | "maxLength": 4000, 22 | "llmResponseType": "json", 23 | "scheme": "{\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 24 | "type": "PLang.Modules.DbModule.Builder", 25 | "promptMessage": [ 26 | { 27 | "role": "system", 28 | "content": [ 29 | { 30 | "type": "text", 31 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON: \r\n\r\n## csharp function ##\r\nInt32 Update(String sql, List()? SqlParameters = null)\r\n## csharp function ##\r\n\r\nvariable is defined with starting and ending %, e.g. %filePath%. Do not remove %\r\nString sql is the SQL statement that should be executed. \r\nString sql can be defined as variable, e.g. %sql%\r\nSql MAY NOT contain a variable(except table name), it MUST be injected using SqlParameters to prevent SQL injection\r\nSqlParameters is List of ParameterInfo(string ParameterName, string VariableNameOrValue, string TypeFullName)\r\nTypeFullName is Full name of the type in c#, System.String, System.Double, System.DateTime, System.Int64, etc.\r\nAll integers are type of System.Int64.\r\nParameter @id MUST be type System.Int64\r\nIf table name is a variable, keep the variable in the sql statement\r\nYou MUST generate a valid sql statement for SQLite.\r\nYou MUST provide SqlParameters if SQL has @parameter.\r\n" 32 | }, 33 | { 34 | "type": "text", 35 | "text": "You MUST respond in JSON, scheme:\r\n {\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 36 | } 37 | ] 38 | }, 39 | { 40 | "role": "assistant", 41 | "content": [ 42 | { 43 | "type": "text", 44 | "text": "# examples #\r\n\"update table myTable, street=%full_street%, %zip%\" => sql: \"UPDATE myTable SET street = @full_street, zip = @zip\", parameters:[{full_street:%full_street%, zip:%zip%}], Warning: Missing WHERE statement can affect rows that should not\r\n\"update tableB, %name%, %phone% where id=%id%\" => sql: \"UPDATE tableB SET name=@name, phone=@phone WHERE id=@id\", parameters:[{name:%name%, phone:%phone%, id=%id%}] \r\n\"update %table% WHERE %name%, set zip=@zip => sql: \"UPDATE %table% SET zip=@zip WHERE name=@name\", parameters:[{name:%name%, zip:%zip%, id=%id%}] \r\n# examples #" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "user", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "execute update %sql%" 54 | } 55 | ] 56 | } 57 | ], 58 | "model": "gpt-4-turbo", 59 | "caching": true, 60 | "RawResponse": "{\n \"Warning\": \"The variable %sql% should not be used directly in the SQL statement to prevent SQL injection risks.\",\n \"FunctionName\": \"Update\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"%sql%\"\n }\n ]\n}" 61 | }, 62 | "RunOnBuild": false 63 | } -------------------------------------------------------------------------------- /.build/entry/Update/08. ExecuteSQLUpdate.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "Warning": "The SQL statement should not be a variable to prevent SQL injection. Please provide a specific SQL statement.", 4 | "FunctionName": "Update", 5 | "Parameters": [ 6 | { 7 | "Type": "String", 8 | "Name": "sql", 9 | "Value": "%sql%" 10 | } 11 | ], 12 | "ReturnValue": null 13 | }, 14 | "Text": "execute sql update, sql=%sql%", 15 | "Reload": false, 16 | "LlmRequest": { 17 | "temperature": 0.0, 18 | "top_p": 0.0, 19 | "frequencyPenalty": 0.0, 20 | "presencePenalty": 0.0, 21 | "maxLength": 4000, 22 | "llmResponseType": "json", 23 | "scheme": "{\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 24 | "type": "PLang.Modules.DbModule.Builder", 25 | "promptMessage": [ 26 | { 27 | "role": "system", 28 | "content": [ 29 | { 30 | "type": "text", 31 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON: \r\n\r\n## csharp function ##\r\nInt32 Update(String sql, List()? SqlParameters = null)\r\n## csharp function ##\r\n\r\nvariable is defined with starting and ending %, e.g. %filePath%. Do not remove %\r\nString sql is the SQL statement that should be executed. \r\nString sql can be defined as variable, e.g. %sql%\r\nSql MAY NOT contain a variable(except table name), it MUST be injected using SqlParameters to prevent SQL injection\r\nSqlParameters is List of ParameterInfo(string ParameterName, string VariableNameOrValue, string TypeFullName)\r\nTypeFullName is Full name of the type in c#, System.String, System.Double, System.DateTime, System.Int64, etc.\r\nAll integers are type of System.Int64.\r\nParameter @id MUST be type System.Int64\r\nIf table name is a variable, keep the variable in the sql statement\r\nYou MUST generate a valid sql statement for SQLite.\r\nYou MUST provide SqlParameters if SQL has @parameter.\r\n" 32 | }, 33 | { 34 | "type": "text", 35 | "text": "You MUST respond in JSON, scheme:\r\n {\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 36 | } 37 | ] 38 | }, 39 | { 40 | "role": "assistant", 41 | "content": [ 42 | { 43 | "type": "text", 44 | "text": "# examples #\r\n\"update table myTable, street=%full_street%, %zip%\" => sql: \"UPDATE myTable SET street = @full_street, zip = @zip\", parameters:[{full_street:%full_street%, zip:%zip%}], Warning: Missing WHERE statement can affect rows that should not\r\n\"update tableB, %name%, %phone% where id=%id%\" => sql: \"UPDATE tableB SET name=@name, phone=@phone WHERE id=@id\", parameters:[{name:%name%, phone:%phone%, id=%id%}] \r\n\"update %table% WHERE %name%, set zip=@zip => sql: \"UPDATE %table% SET zip=@zip WHERE name=@name\", parameters:[{name:%name%, zip:%zip%, id=%id%}] \r\n# examples #" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "user", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "execute sql update, sql=%sql%" 54 | } 55 | ] 56 | } 57 | ], 58 | "model": "gpt-4-turbo", 59 | "caching": true, 60 | "RawResponse": "{\n \"Warning\": \"The SQL statement should not be a variable to prevent SQL injection. Please provide a specific SQL statement.\",\n \"FunctionName\": \"Update\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"%sql%\"\n }\n ]\n}" 61 | }, 62 | "RunOnBuild": false 63 | } -------------------------------------------------------------------------------- /.build/actions/Update/09. ExecuteSQLUpdate.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "Warning": "The variable %sql% should not be used directly to avoid SQL injection risks. Please provide the specific SQL statement.", 4 | "FunctionName": "Update", 5 | "Parameters": [ 6 | { 7 | "Type": "String", 8 | "Name": "sql", 9 | "Value": "%sql%" 10 | } 11 | ], 12 | "ReturnValue": null 13 | }, 14 | "Text": "execute sql update, sql=%sql%", 15 | "Reload": false, 16 | "LlmRequest": { 17 | "temperature": 0.0, 18 | "top_p": 0.0, 19 | "frequencyPenalty": 0.0, 20 | "presencePenalty": 0.0, 21 | "maxLength": 4000, 22 | "llmResponseType": "json", 23 | "scheme": "{\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 24 | "type": "PLang.Modules.DbModule.Builder", 25 | "promptMessage": [ 26 | { 27 | "role": "system", 28 | "content": [ 29 | { 30 | "type": "text", 31 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON: \r\n\r\n## csharp function ##\r\nInt32 Update(String sql, List()? SqlParameters = null)\r\n## csharp function ##\r\n\r\nvariable is defined with starting and ending %, e.g. %filePath%. Do not remove %\r\nString sql is the SQL statement that should be executed. \r\nString sql can be defined as variable, e.g. %sql%\r\nSql MAY NOT contain a variable(except table name), it MUST be injected using SqlParameters to prevent SQL injection\r\nSqlParameters is List of ParameterInfo(string ParameterName, string VariableNameOrValue, string TypeFullName)\r\nTypeFullName is Full name of the type in c#, System.String, System.Double, System.DateTime, System.Int64, etc.\r\nAll integers are type of System.Int64.\r\nParameter @id MUST be type System.Int64\r\nIf table name is a variable, keep the variable in the sql statement\r\nYou MUST generate a valid sql statement for PostgreSQL.\r\nYou MUST provide SqlParameters if SQL has @parameter.\r\n" 32 | }, 33 | { 34 | "type": "text", 35 | "text": "You MUST respond in JSON, scheme:\r\n {\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 36 | } 37 | ] 38 | }, 39 | { 40 | "role": "assistant", 41 | "content": [ 42 | { 43 | "type": "text", 44 | "text": "# examples #\r\n\"update table myTable, street=%full_street%, %zip%\" => sql: \"UPDATE myTable SET street = @full_street, zip = @zip\", parameters:[{full_street:%full_street%, zip:%zip%}], Warning: Missing WHERE statement can affect rows that should not\r\n\"update tableB, %name%, %phone% where id=%id%\" => sql: \"UPDATE tableB SET name=@name, phone=@phone WHERE id=@id\", parameters:[{name:%name%, phone:%phone%, id=%id%}] \r\n\"update %table% WHERE %name%, set zip=@zip => sql: \"UPDATE %table% SET zip=@zip WHERE name=@name\", parameters:[{name:%name%, zip:%zip%, id=%id%}] \r\n# examples #" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "user", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "execute sql update, sql=%sql%" 54 | } 55 | ] 56 | } 57 | ], 58 | "model": "gpt-4-turbo", 59 | "caching": true, 60 | "RawResponse": "{\n \"Warning\": \"The variable %sql% should not be used directly to avoid SQL injection risks. Please provide the specific SQL statement.\",\n \"FunctionName\": \"Update\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"%sql%\"\n }\n ]\n}" 61 | }, 62 | "RunOnBuild": false 63 | } -------------------------------------------------------------------------------- /.build/events/CheckGoals/03. ProcessGoalFiles.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "RunLoop", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "variableToLoopThrough", 8 | "Value": "%goalFiles%" 9 | }, 10 | { 11 | "Type": "String", 12 | "Name": "goalNameToCall", 13 | "Value": "!CheckGoal" 14 | }, 15 | { 16 | "Type": "Dictionary`2", 17 | "Name": "parameters", 18 | "Value": { 19 | "item": "%goal%" 20 | } 21 | } 22 | ], 23 | "ReturnValue": null 24 | }, 25 | "Text": "go throug %goalFiles%, call !CheckGoal item=%goal%", 26 | "Reload": false, 27 | "LlmRequest": { 28 | "temperature": 0.0, 29 | "top_p": 0.0, 30 | "frequencyPenalty": 0.0, 31 | "presencePenalty": 0.0, 32 | "maxLength": 4000, 33 | "llmResponseType": "json", 34 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 35 | "type": "PLang.Modules.GenericFunctionBuilder", 36 | "promptMessage": [ 37 | { 38 | "role": "system", 39 | "content": [ 40 | { 41 | "type": "text", 42 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 43 | }, 44 | { 45 | "type": "text", 46 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 47 | } 48 | ] 49 | }, 50 | { 51 | "role": "assistant", 52 | "content": [ 53 | { 54 | "type": "text", 55 | "text": "## functions available starts ##\r\nvoid RunLoop(String variableToLoopThrough, String goalNameToCall, Dictionary`2? parameters) // Call another Goal, when ! is prefixed, e.g. !RenameFile or !Google/Search, parameters are sent to the goal being called.\r\n## functions available ends ##\r\n## defined variables ##\r\ngoalFiles (type:List`1), goal (type:object), \r\n## defined variables ##" 56 | } 57 | ] 58 | }, 59 | { 60 | "role": "user", 61 | "content": [ 62 | { 63 | "type": "text", 64 | "text": "go throug %goalFiles%, call !CheckGoal item=%goal%" 65 | } 66 | ] 67 | } 68 | ], 69 | "model": "gpt-4-turbo", 70 | "caching": true, 71 | "RawResponse": null 72 | }, 73 | "RunOnBuild": false 74 | } -------------------------------------------------------------------------------- /.build/knowledge/Delete/DeleteKnowledge/02. DeleteDatabaseRecord.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "Warning": null, 4 | "FunctionName": "Delete", 5 | "Parameters": [ 6 | { 7 | "Type": "String", 8 | "Name": "sql", 9 | "Value": "DELETE FROM knowledge WHERE id=@id" 10 | }, 11 | { 12 | "Type": "List", 13 | "Name": "SqlParameters", 14 | "Value": [ 15 | { 16 | "ParameterName": "@id", 17 | "VariableNameOrValue": "%item%", 18 | "TypeFullName": "System.Int64" 19 | } 20 | ] 21 | } 22 | ], 23 | "ReturnValue": null 24 | }, 25 | "Text": "delete from knowledge where id=%item%", 26 | "Reload": false, 27 | "LlmRequest": { 28 | "temperature": 0.0, 29 | "top_p": 0.0, 30 | "frequencyPenalty": 0.0, 31 | "presencePenalty": 0.0, 32 | "maxLength": 4000, 33 | "llmResponseType": "json", 34 | "scheme": "{\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 35 | "type": "PLang.Modules.DbModule.Builder", 36 | "promptMessage": [ 37 | { 38 | "role": "system", 39 | "content": [ 40 | { 41 | "type": "text", 42 | "text": "Map user command to this c# function: \r\n\r\n## csharp function ##\r\nInt32 Delete(String sql, List()? SqlParameters = null)\r\n## csharp function ##\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%.\r\nSqlParameters is List of ParameterInfo(string ParameterName, string VariableNameOrValue, string TypeFullName)\r\nTypeFullName is Full name of the type in c#, System.String, System.Double, etc.\r\nParameter @id MUST be type System.Int64\r\n\r\nIf table name is a variable, keep the variable in the sql statement\r\nYou MUST generate a valid sql statement for SQLite.\r\nYou MUST provide SqlParameters if SQL has @parameter.\r\n" 43 | }, 44 | { 45 | "type": "text", 46 | "text": "You MUST respond in JSON, scheme:\r\n {\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 47 | } 48 | ] 49 | }, 50 | { 51 | "role": "assistant", 52 | "content": [ 53 | { 54 | "type": "text", 55 | "text": "# examples #\r\n\"delete from tableX\" => sql: \"DELETE FROM tableX\", warning: Missing WHERE statement can affect rows that should not\r\n\"delete tableB where id=%id%\" => sql: \"DELETE FROM tableB WHERE id=@id\", warning: null\r\n\"delete * from %table% WHERE %name% => sql: \"DELETE FROM %table% WHERE name=@name\"\r\n# examples #" 56 | }, 57 | { 58 | "type": "text", 59 | "text": "### knowledge table info starts ###\n[{\"name\":\"id\",\"type\":\"INTEGER\"},{\"name\":\"info\",\"type\":\"TEXT\"},{\"name\":\"created\",\"type\":\"DATETIME\"}]\n### table info ends ###" 60 | } 61 | ] 62 | }, 63 | { 64 | "role": "user", 65 | "content": [ 66 | { 67 | "type": "text", 68 | "text": "delete from knowledge where id=%item%" 69 | } 70 | ] 71 | } 72 | ], 73 | "model": "gpt-4-turbo", 74 | "caching": true, 75 | "RawResponse": "```json\n{\n \"Warning\": null,\n \"FunctionName\": \"Delete\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"DELETE FROM knowledge WHERE id=@id\"\n },\n {\n \"Type\": \"List\",\n \"Name\": \"SqlParameters\",\n \"Value\": [\n {\n \"ParameterName\": \"@id\",\n \"VariableNameOrValue\": \"%item%\",\n \"TypeFullName\": \"System.Int64\"\n }\n ]\n }\n ]\n}\n```" 76 | }, 77 | "RunOnBuild": false 78 | } -------------------------------------------------------------------------------- /.build/knowledge/Insert/UpdateFoodEntry/01. ExecuteSQLUpdate.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "Warning": "Missing WHERE statement can affect rows that should not be affected. Also, the SQL statement is incomplete and lacks specific details on what to update.", 4 | "FunctionName": "Update", 5 | "Parameters": [ 6 | { 7 | "Type": "String", 8 | "Name": "sql", 9 | "Value": "%item%" 10 | } 11 | ], 12 | "ReturnValue": null 13 | }, 14 | "Text": "execute update sql=%item%", 15 | "Reload": false, 16 | "LlmRequest": { 17 | "temperature": 0.0, 18 | "top_p": 0.0, 19 | "frequencyPenalty": 0.0, 20 | "presencePenalty": 0.0, 21 | "maxLength": 4000, 22 | "llmResponseType": "json", 23 | "scheme": "{\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 24 | "type": "PLang.Modules.DbModule.Builder", 25 | "promptMessage": [ 26 | { 27 | "role": "system", 28 | "content": [ 29 | { 30 | "type": "text", 31 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON: \r\n\r\n## csharp function ##\r\nInt32 Update(String sql, List()? SqlParameters = null)\r\n## csharp function ##\r\n\r\nvariable is defined with starting and ending %, e.g. %filePath%. Do not remove %\r\nString sql is the SQL statement that should be executed. \r\nString sql can be defined as variable, e.g. %sql%\r\nSql MAY NOT contain a variable(except table name), it MUST be injected using SqlParameters to prevent SQL injection\r\nSqlParameters is List of ParameterInfo(string ParameterName, string VariableNameOrValue, string TypeFullName)\r\nTypeFullName is Full name of the type in c#, System.String, System.Double, System.DateTime, System.Int64, etc.\r\nAll integers are type of System.Int64.\r\nParameter @id MUST be type System.Int64\r\nIf table name is a variable, keep the variable in the sql statement\r\nYou MUST generate a valid sql statement for SQLite.\r\nYou MUST provide SqlParameters if SQL has @parameter.\r\n" 32 | }, 33 | { 34 | "type": "text", 35 | "text": "You MUST respond in JSON, scheme:\r\n {\"Warning\": string = null,\n\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 36 | } 37 | ] 38 | }, 39 | { 40 | "role": "assistant", 41 | "content": [ 42 | { 43 | "type": "text", 44 | "text": "# examples #\r\n\"update table myTable, street=%full_street%, %zip%\" => sql: \"UPDATE myTable SET street = @full_street, zip = @zip\", parameters:[{full_street:%full_street%, zip:%zip%}], Warning: Missing WHERE statement can affect rows that should not\r\n\"update tableB, %name%, %phone% where id=%id%\" => sql: \"UPDATE tableB SET name=@name, phone=@phone WHERE id=@id\", parameters:[{name:%name%, phone:%phone%, id=%id%}] \r\n\"update %table% WHERE %name%, set zip=@zip => sql: \"UPDATE %table% SET zip=@zip WHERE name=@name\", parameters:[{name:%name%, zip:%zip%, id=%id%}] \r\n# examples #" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "user", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "execute update sql=%item%" 54 | } 55 | ] 56 | } 57 | ], 58 | "model": "gpt-4-turbo", 59 | "caching": true, 60 | "RawResponse": "{\n \"Warning\": \"Missing WHERE statement can affect rows that should not be affected. Also, the SQL statement is incomplete and lacks specific details on what to update.\",\n \"FunctionName\": \"Update\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"%item%\"\n }\n ]\n}" 61 | }, 62 | "RunOnBuild": false 63 | } -------------------------------------------------------------------------------- /.build/Setup/03. CreateDatabaseTable.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "CreateTable", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "sql", 8 | "Value": "CREATE TABLE knowledge (id INTEGER PRIMARY KEY, info TEXT, created DATETIME DEFAULT (datetime('now')))" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "create table knowledge, columns: info(string), created(datetime, now)", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.DbModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Map user command to this c# function: \r\n\r\n## csharp function ##\r\nvoid CreateTable(String sql) \r\n## csharp function ##\r\n\r\nIf table name is a variable, keep the variable in the sql statement\r\nvariable is defined with starting and ending %, e.g. %filePath%.\r\nYou MUST generate a valid sql statement for SQLite.\r\nYou MUST add id to create statement.\r\nIf id is not defined then add id to the create statement. \r\nThe id MUST NOT be auto incremental, but is primary key.\r\nThe id should be datatype long/bigint/.. which fits SQLite.\r\n" 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nvoid CreateDataSource(String name, String? dbType, Boolean? setAsDefaultForApp = False, Boolean? keepHistoryEventSourcing = False) \nvoid SetDataSouceName(String name) \nvoid BeginTransaction() \nvoid EndTransaction() \nvoid LoadExtension(String fileName, String? procName) \nString GetDatabaseStructure() // Returns tables and views in database with the columns description. \nInt32 Execute(String sql) \nvoid CreateTable(String sql) \nObject SelectOneRow(String sql, List`1? SqlParameters) \nList`1 Select(String sql, List`1? SqlParameters) \nInt32 Update(String sql, List`1? SqlParameters) \nInt32 Delete(String sql, List`1? SqlParameters) \nInt32 Insert(String sql, List`1? SqlParameters) // Basic insert statement. Will return affected row count. \nObject InsertAndSelectIdOfInsertedRow(String sql, List`1? SqlParameters) // Insert statement that will return the id of the inserted row. Use only if user requests the id. \nInt32 InsertBulk(String tableName, List`1 items) // Insert a list(bulk) into database, return number of rows inserted. \nString GetAdditionalSystemErrorInfo() \nString GetAdditionalAssistantErrorInfo()\r\n## functions available ends ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "create table knowledge, columns: info(string), created(datetime, now)" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "```json\n{\n \"FunctionName\": \"CreateTable\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"CREATE TABLE knowledge (id INTEGER PRIMARY KEY, info TEXT, created DATETIME DEFAULT (datetime('now')))\"\n }\n ]\n}\n```" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/events/CheckGoals/CheckGoal/01. CheckGoalSteps.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "RunLoop", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "variableToLoopThrough", 8 | "Value": "%goal.Content.GoalSteps%" 9 | }, 10 | { 11 | "Type": "String", 12 | "Name": "goalNameToCall", 13 | "Value": "!CheckStep" 14 | }, 15 | { 16 | "Type": "Dictionary`2", 17 | "Name": "parameters", 18 | "Value": { 19 | "item": "%step%" 20 | } 21 | } 22 | ], 23 | "ReturnValue": null 24 | }, 25 | "Text": "go through %goal.Content.GoalSteps%, call CheckStep item=%step%", 26 | "Reload": false, 27 | "LlmRequest": { 28 | "temperature": 0.0, 29 | "top_p": 0.0, 30 | "frequencyPenalty": 0.0, 31 | "presencePenalty": 0.0, 32 | "maxLength": 4000, 33 | "llmResponseType": "json", 34 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 35 | "type": "PLang.Modules.GenericFunctionBuilder", 36 | "promptMessage": [ 37 | { 38 | "role": "system", 39 | "content": [ 40 | { 41 | "type": "text", 42 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 43 | }, 44 | { 45 | "type": "text", 46 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 47 | } 48 | ] 49 | }, 50 | { 51 | "role": "assistant", 52 | "content": [ 53 | { 54 | "type": "text", 55 | "text": "## functions available starts ##\r\nvoid RunLoop(String variableToLoopThrough, String goalNameToCall, Dictionary`2? parameters) // Call another Goal, when ! is prefixed, e.g. !RenameFile or !Google/Search, parameters are sent to the goal being called.\r\n## functions available ends ##\r\n## defined variables ##\r\ngoal.Content.GoalSteps (type:object), step (type:object), \r\n## defined variables ##" 56 | } 57 | ] 58 | }, 59 | { 60 | "role": "user", 61 | "content": [ 62 | { 63 | "type": "text", 64 | "text": "go through %goal.Content.GoalSteps%, call CheckStep item=%step%" 65 | } 66 | ] 67 | } 68 | ], 69 | "model": "gpt-4-turbo", 70 | "caching": true, 71 | "RawResponse": null 72 | }, 73 | "RunOnBuild": false 74 | } -------------------------------------------------------------------------------- /.build/Settings/08. CallStartGoal.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "RunGoal", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "goalName", 8 | "Value": "!Start" 9 | }, 10 | { 11 | "Type": "Dictionary`2", 12 | "Name": "parameters", 13 | "Value": null 14 | }, 15 | { 16 | "Type": "Boolean?", 17 | "Name": "waitForExecution", 18 | "Value": true 19 | } 20 | ], 21 | "ReturnValue": null 22 | }, 23 | "Text": "call !Start", 24 | "Reload": false, 25 | "LlmRequest": { 26 | "temperature": 0.0, 27 | "top_p": 0.0, 28 | "frequencyPenalty": 0.0, 29 | "presencePenalty": 0.0, 30 | "maxLength": 4000, 31 | "llmResponseType": "json", 32 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 33 | "type": "PLang.Modules.CallGoalModule.Builder", 34 | "promptMessage": [ 35 | { 36 | "role": "system", 37 | "content": [ 38 | { 39 | "type": "text", 40 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 41 | }, 42 | { 43 | "type": "text", 44 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "assistant", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "## functions available starts ##\r\nvoid RunGoal(String goalName, Dictionary`2? parameters, Boolean? waitForExecution = True, Int32? delayWhenNotWaitingInMilliseconds = 50) // If backward slash(\\) is used by user, change to forward slash(/).\r\n## functions available ends ##" 54 | }, 55 | { 56 | "type": "text", 57 | "text": "\r\n== Examples starts ==\r\ncall !ParseText => ParseText is goalName, no parameters\r\ncall !Gmail/Search %query%, => Gmail/Search is goalName, %query% is key and value in parameters\r\ncall Folder/Search q=%fileName% => Folder/Search is goalName, parameter key is q, and value is %fileName%\r\n== Examples ends ==\r\n" 58 | } 59 | ] 60 | }, 61 | { 62 | "role": "user", 63 | "content": [ 64 | { 65 | "type": "text", 66 | "text": "call !Start" 67 | } 68 | ] 69 | } 70 | ], 71 | "model": "gpt-4-turbo", 72 | "caching": true, 73 | "RawResponse": null 74 | }, 75 | "RunOnBuild": false 76 | } -------------------------------------------------------------------------------- /.build/AnalyzeAndStore/08. CallStartGoal.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "RunGoal", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "goalName", 8 | "Value": "!Start" 9 | }, 10 | { 11 | "Type": "Dictionary`2", 12 | "Name": "parameters", 13 | "Value": null 14 | }, 15 | { 16 | "Type": "Boolean?", 17 | "Name": "waitForExecution", 18 | "Value": true 19 | } 20 | ], 21 | "ReturnValue": null 22 | }, 23 | "Text": "call !Start", 24 | "Reload": false, 25 | "LlmRequest": { 26 | "temperature": 0.0, 27 | "top_p": 0.0, 28 | "frequencyPenalty": 0.0, 29 | "presencePenalty": 0.0, 30 | "maxLength": 4000, 31 | "llmResponseType": "json", 32 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 33 | "type": "PLang.Modules.CallGoalModule.Builder", 34 | "promptMessage": [ 35 | { 36 | "role": "system", 37 | "content": [ 38 | { 39 | "type": "text", 40 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 41 | }, 42 | { 43 | "type": "text", 44 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "assistant", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "## functions available starts ##\r\nvoid RunGoal(String goalName, Dictionary`2? parameters, Boolean? waitForExecution = True, Int32? delayWhenNotWaitingInMilliseconds = 50) // If backward slash(\\) is used by user, change to forward slash(/).\r\n## functions available ends ##" 54 | }, 55 | { 56 | "type": "text", 57 | "text": "\r\n== Examples starts ==\r\ncall !ParseText => ParseText is goalName, no parameters\r\ncall !Gmail/Search %query%, => Gmail/Search is goalName, %query% is key and value in parameters\r\ncall Folder/Search q=%fileName% => Folder/Search is goalName, parameter key is q, and value is %fileName%\r\n== Examples ends ==\r\n" 58 | } 59 | ] 60 | }, 61 | { 62 | "role": "user", 63 | "content": [ 64 | { 65 | "type": "text", 66 | "text": "call !Start" 67 | } 68 | ] 69 | } 70 | ], 71 | "model": "gpt-4-turbo", 72 | "caching": true, 73 | "RawResponse": null 74 | }, 75 | "RunOnBuild": false 76 | } -------------------------------------------------------------------------------- /.build/actions/Insert/01. DisplayInsertMessage.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Write", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "content", 8 | "Value": "Doing Insert" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "write out 'Doing Insert'", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.OutputModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nString Ask(String text, String? type = \"text\", Int32? statusCode = 200, String? regexPattern, String? errorMessage) // Send response to user and waits for answer. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. regexPattern should contain start and end character if user input needs to match fully. errorMessage is message to user when answer does not match expected regexPattern, use good grammar and correct formatting.. \nvoid Write(Object? content, Boolean? writeToBuffer = False, String? type = \"text\", Int32? statusCode = 200) // Write to the output. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. type=error should have statusCode between 400-599, depending on text.\r\n## functions available ends ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "write out 'Doing Insert'" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Write\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"content\",\n \"Value\": \"Doing Insert\"\n }\n ]\n}" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/entry/Insert/01. DisplayInsertMessage.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Write", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "content", 8 | "Value": "Doing Insert" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "write out 'Doing Insert'", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.OutputModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nString Ask(String text, String? type = \"text\", Int32? statusCode = 200, String? regexPattern, String? errorMessage) // Send response to user and waits for answer. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. regexPattern should contain start and end character if user input needs to match fully. errorMessage is message to user when answer does not match expected regexPattern, use good grammar and correct formatting.. \nvoid Write(Object? content, Boolean? writeToBuffer = False, String? type = \"text\", Int32? statusCode = 200) // Write to the output. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. type=error should have statusCode between 400-599, depending on text.\r\n## functions available ends ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "write out 'Doing Insert'" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Write\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"content\",\n \"Value\": \"Doing Insert\"\n }\n ]\n}" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/actions/Select/01. DisplayDoingSelect.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Write", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "content", 8 | "Value": "Doing Select" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "write out 'Doing Select'", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.OutputModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nString Ask(String text, String? type = \"text\", Int32? statusCode = 200, String? regexPattern, String? errorMessage) // Send response to user and waits for answer. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. regexPattern should contain start and end character if user input needs to match fully. errorMessage is message to user when answer does not match expected regexPattern, use good grammar and correct formatting.. \nvoid Write(Object? content, Boolean? writeToBuffer = False, String? type = \"text\", Int32? statusCode = 200) // Write to the output. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. type=error should have statusCode between 400-599, depending on text.\r\n## functions available ends ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "write out 'Doing Select'" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Write\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"content\",\n \"Value\": \"Doing Select\"\n }\n ],\n \"ReturnValue\": null\n}" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/actions/Insert/06. OutputUserInput.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Write", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "content", 8 | "Value": "Doing message:%userInput%" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "write out 'Doing message:%userInput%'", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.OutputModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nString Ask(String text, String? type = \"text\", Int32? statusCode = 200, String? regexPattern, String? errorMessage) // Send response to user and waits for answer. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. errorMessage is message to user when answer does not match expected regexPattern, use good grammar and correct formatting.. \nvoid Write(Object? content, Boolean? writeToBuffer = False, String? type = \"text\", Int32? statusCode = 200) // Write to the output. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. type=error should have statusCode between 400-599, depending on text.\r\n## functions available ends ##\r\n## defined variables ##\r\nuserInput (type:object), \r\n## defined variables ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "write out 'Doing message:%userInput%'" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Write\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"content\",\n \"Value\": \"Doing message:%userInput%\"\n }\n ]\n}" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/actions/Select/DoResults/01. DatabaseSelect.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Select", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "sql", 8 | "Value": "%sql%" 9 | } 10 | ], 11 | "ReturnValue": [ 12 | { 13 | "Type": "System.Object", 14 | "VariableName": "results" 15 | } 16 | ] 17 | }, 18 | "Text": "do select on db, %sql%, write to %results%", 19 | "Reload": false, 20 | "LlmRequest": { 21 | "temperature": 0.0, 22 | "top_p": 0.0, 23 | "frequencyPenalty": 0.0, 24 | "presencePenalty": 0.0, 25 | "maxLength": 4000, 26 | "llmResponseType": "json", 27 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 28 | "type": "PLang.Modules.DbModule.Builder", 29 | "promptMessage": [ 30 | { 31 | "role": "system", 32 | "content": [ 33 | { 34 | "type": "text", 35 | "text": "Map user command to either of these c# functions: \r\n\r\n## csharp function ##\r\nList Select(String sql, List()? SqlParameters = null)\r\nobject? SelectOneRow(String sql, List()? SqlParameters = null)\r\n## csharp function ##\r\n\r\n## Rules ##\r\nSelectOneRow function is used when user defines to select only one row or when selecting by %id%\r\nVariable is defined with starting and ending %, e.g. %filePath%.\r\n\\% is escape from start of variable, would be used in LIKE statements, then VariableNameOrValue should keep the escaped character, e.g. the user input \\%%title%\\%, should map to VariableNameOrValue=\\%%title%\\%\r\nSqlParameters is List of ParameterInfo(string ParameterName, string VariableNameOrValue, string TypeFullName). SqlParameters @id MUST be type System.Int64\r\nTypeFullName is Full name of the type in c#, System.String, System.Double, etc.\r\nReturnValue rules: \r\n- If user defines variable to write into, e.g. 'write to %result%' then ReturnValue=%result%, \r\n- If there does not define 'write to ..' statement then Columns being returned with type if defined by user. \r\n- integer/int should always be System.Int64. \r\n\r\nIf table name is a variable, keep the variable in the sql statement\r\nYou MUST generate a valid sql statement for PostgreSQL.\r\nYou MUST provide SqlParameters if SQL has @parameter.\r\n## Rules ##\r\n" 36 | }, 37 | { 38 | "type": "text", 39 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 40 | } 41 | ] 42 | }, 43 | { 44 | "role": "assistant", 45 | "content": [ 46 | { 47 | "type": "text", 48 | "text": "# examples #\r\n- select everything from tableX, write to %table% => sql: SELECT * FROM tableX, ReturnValue: %table%\r\n- select from tableB where id=%id%, into %table% => sql: SELECT * FROM tableB WHERE id=@id, ReturnValue: %table%\r\n- select * from %table% WHERE %name%, write to %result% => sql: SELECT * FROM %table% WHERE name=@name, ReturnValue: %result%\r\n- select id, name from users, write to %user% => then ReturnValue is %user% object\r\n- select id, name from users => then ReturnValue is %id%, %name% objects\r\n# examples #\r\n# ParameterInfo scheme #\r\n{\"ParameterName\" : string, \"VariableNameOrValue\" : object, \"TypeFullName\" : string, }\r\n# ParameterInfo scheme #\r\n" 49 | } 50 | ] 51 | }, 52 | { 53 | "role": "user", 54 | "content": [ 55 | { 56 | "type": "text", 57 | "text": "do select on db, %sql%, write to %results%" 58 | } 59 | ] 60 | } 61 | ], 62 | "model": "gpt-4-turbo", 63 | "caching": true, 64 | "RawResponse": "{\n \"FunctionName\": \"Select\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"%sql%\"\n }\n ],\n \"ReturnValue\": [\n {\n \"Type\": \"System.Object\",\n \"VariableName\": \"results\"\n }\n ]\n}" 65 | }, 66 | "RunOnBuild": false 67 | } -------------------------------------------------------------------------------- /.build/Start/HandleUserInput/04. OutputPlan.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Write", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "content", 8 | "Value": "%plan%" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "write out %plan%", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.OutputModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nString Ask(String text, String? type = \"text\", Int32? statusCode = 200, String? regexPattern, String? errorMessage) // Send response to user and waits for answer. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. regexPattern should contain start and end character if user input needs to match fully. errorMessage is message to user when answer does not match expected regexPattern, use good grammar and correct formatting.. \nvoid Write(Object? content, Boolean? writeToBuffer = False, String? type = \"text\", Int32? statusCode = 200) // Write to the output. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. type=error should have statusCode between 400-599, depending on text.\r\n## functions available ends ##\r\n## defined variables ##\r\nplan (type:String), \r\n## defined variables ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "write out %plan%" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Write\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"content\",\n \"Value\": \"%plan%\"\n }\n ],\n \"ReturnValue\": null\n}" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/SendMessage/01. WriteOutput.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Write", 4 | "Parameters": [ 5 | { 6 | "Type": "Object", 7 | "Name": "content", 8 | "Value": "%content%" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "write out %content%", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.OutputModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nString Ask(String text, String? type = \"text\", Int32? statusCode = 200, String? regexPattern, String? errorMessage) // Send response to user and waits for answer. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. regexPattern should contain start and end character if user input needs to match fully. errorMessage is message to user when answer does not match expected regexPattern, use good grammar and correct formatting.. \nvoid Write(Object? content, Boolean? writeToBuffer = False, String? type = \"text\", Int32? statusCode = 200) // Write to the output. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. type=error should have statusCode between 400-599, depending on text.\r\n## functions available ends ##\r\n## defined variables ##\r\ncontent (type:output), \r\n## defined variables ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "write out %content%" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Write\",\n \"Parameters\": [\n {\n \"Type\": \"Object\",\n \"Name\": \"content\",\n \"Value\": \"%content%\"\n }\n ],\n \"ReturnValue\": null\n}" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/Start/HandleUserInput/05. ExecuteGoalsInPlan.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "RunLoop", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "variableToLoopThrough", 8 | "Value": "%plan.goals%" 9 | }, 10 | { 11 | "Type": "String", 12 | "Name": "goalNameToCall", 13 | "Value": "!ExecuteGoal" 14 | }, 15 | { 16 | "Type": "Dictionary`2", 17 | "Name": "parameters", 18 | "Value": null 19 | } 20 | ], 21 | "ReturnValue": null 22 | }, 23 | "Text": "foreach %plan.goals% call ExecuteGoal", 24 | "Reload": false, 25 | "LlmRequest": { 26 | "temperature": 0.0, 27 | "top_p": 0.0, 28 | "frequencyPenalty": 0.0, 29 | "presencePenalty": 0.0, 30 | "maxLength": 4000, 31 | "llmResponseType": "json", 32 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 33 | "type": "PLang.Modules.GenericFunctionBuilder", 34 | "promptMessage": [ 35 | { 36 | "role": "system", 37 | "content": [ 38 | { 39 | "type": "text", 40 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 41 | }, 42 | { 43 | "type": "text", 44 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "assistant", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "## functions available starts ##\r\nvoid RunLoop(String variableToLoopThrough, String goalNameToCall, Dictionary`2? parameters) // Call another Goal, when ! is prefixed, e.g. !RenameFile or !Google/Search, parameters are sent to the goal being called.\r\n## functions available ends ##\r\n## defined variables ##\r\nplan.goals (type:object), \r\n## defined variables ##" 54 | } 55 | ] 56 | }, 57 | { 58 | "role": "user", 59 | "content": [ 60 | { 61 | "type": "text", 62 | "text": "foreach %plan.goals% call ExecuteGoal" 63 | } 64 | ] 65 | } 66 | ], 67 | "model": "gpt-4-turbo", 68 | "caching": true, 69 | "RawResponse": "{\n \"FunctionName\": \"RunLoop\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"variableToLoopThrough\",\n \"Value\": \"%plan.goals%\"\n },\n {\n \"Type\": \"String\",\n \"Name\": \"goalNameToCall\",\n \"Value\": \"!ExecuteGoal\"\n },\n {\n \"Type\": \"Dictionary`2\",\n \"Name\": \"parameters\",\n \"Value\": null\n }\n ],\n \"ReturnValue\": null\n}" 70 | }, 71 | "RunOnBuild": false 72 | } -------------------------------------------------------------------------------- /.build/knowledge/Delete/DeleteKnowledges/01. ForEachDeleteKnowledge.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "RunLoop", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "variableToLoopThrough", 8 | "Value": "%ids%" 9 | }, 10 | { 11 | "Type": "String", 12 | "Name": "goalNameToCall", 13 | "Value": "!DeleteKnowledge" 14 | }, 15 | { 16 | "Type": "Dictionary`2", 17 | "Name": "parameters", 18 | "Value": null 19 | } 20 | ], 21 | "ReturnValue": null 22 | }, 23 | "Text": "foreach %ids% call DeleteKnowledge", 24 | "Reload": false, 25 | "LlmRequest": { 26 | "temperature": 0.0, 27 | "top_p": 0.0, 28 | "frequencyPenalty": 0.0, 29 | "presencePenalty": 0.0, 30 | "maxLength": 4000, 31 | "llmResponseType": "json", 32 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 33 | "type": "PLang.Modules.GenericFunctionBuilder", 34 | "promptMessage": [ 35 | { 36 | "role": "system", 37 | "content": [ 38 | { 39 | "type": "text", 40 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 41 | }, 42 | { 43 | "type": "text", 44 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "assistant", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "## functions available starts ##\r\nvoid RunLoop(String variableToLoopThrough, String goalNameToCall, Dictionary`2? parameters) // Call another Goal, when ! is prefixed, e.g. !RenameFile or !Google/Search, parameters are sent to the goal being called.\r\n## functions available ends ##\r\n## defined variables ##\r\nids (type:object), \r\n## defined variables ##" 54 | } 55 | ] 56 | }, 57 | { 58 | "role": "user", 59 | "content": [ 60 | { 61 | "type": "text", 62 | "text": "foreach %ids% call DeleteKnowledge" 63 | } 64 | ] 65 | } 66 | ], 67 | "model": "gpt-4-turbo", 68 | "caching": true, 69 | "RawResponse": "{\n \"FunctionName\": \"RunLoop\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"variableToLoopThrough\",\n \"Value\": \"%ids%\"\n },\n {\n \"Type\": \"String\",\n \"Name\": \"goalNameToCall\",\n \"Value\": \"!DeleteKnowledge\"\n },\n {\n \"Type\": \"Dictionary`2\",\n \"Name\": \"parameters\",\n \"Value\": null\n }\n ],\n \"ReturnValue\": null\n}" 70 | }, 71 | "RunOnBuild": false 72 | } -------------------------------------------------------------------------------- /.build/Setup/04. AddColumnsToFooodEntries.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Execute", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "sql", 8 | "Value": "ALTER TABLE food_entries ADD COLUMN fiber NUMERIC; ALTER TABLE food_entries ADD COLUMN net_carbs NUMERIC;" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "add columns to food_entries\n fiber(number), net_carbs(number)", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.DbModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Generate the SQL statement from user command. \r\nThe SQL statement MUST be a valid SQL statement for SQLite. \r\nMake sure to use correct data types that match SQLite\r\nYou MUST provide Parameters if SQL has @parameter.\r\n" 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available defined in csharp ##\r\nvoid CreateDataSource(String name, String? dbType, Boolean? setAsDefaultForApp = False, Boolean? keepHistoryEventSourcing = False) \nvoid SetDataSouceName(String name) \nvoid BeginTransaction() \nvoid EndTransaction() \nvoid LoadExtension(String fileName, String? procName) \nString GetDatabaseStructure() // Returns tables and views in database with the columns description. \nInt32 Execute(String sql) \nvoid CreateTable(String sql) \nObject SelectOneRow(String sql, List`1? SqlParameters) \nList`1 Select(String sql, List`1? SqlParameters) \nInt32 Update(String sql, List`1? SqlParameters) \nInt32 Delete(String sql, List`1? SqlParameters) \nInt32 Insert(String sql, List`1? SqlParameters) // Basic insert statement. Will return affected row count. \nObject InsertAndSelectIdOfInsertedRow(String sql, List`1? SqlParameters) // Insert statement that will return the id of the inserted row. Use only if user requests the id. \nInt32 InsertBulk(String tableName, List`1 items) // Insert a list(bulk) into database, return number of rows inserted. \nString GetAdditionalSystemErrorInfo() \nString GetAdditionalAssistantErrorInfo() \n\r\n## functions available ends ##\r\n" 44 | }, 45 | { 46 | "type": "text", 47 | "text": "### food_entries table info starts ###\n[{\"name\":\"id\",\"type\":\"BIGINT\"},{\"name\":\"date\",\"type\":\"TIMESTAMP\"},{\"name\":\"dish_name\",\"type\":\"TEXT\"},{\"name\":\"user_input\",\"type\":\"TEXT\"},{\"name\":\"total_weight\",\"type\":\"NUMERIC\"},{\"name\":\"ingredients\",\"type\":\"JSON\"},{\"name\":\"total_calories\",\"type\":\"NUMERIC\"},{\"name\":\"carbs\",\"type\":\"NUMERIC\"},{\"name\":\"fat\",\"type\":\"NUMERIC\"},{\"name\":\"protein\",\"type\":\"NUMERIC\"},{\"name\":\"emojis\",\"type\":\"TEXT\"}]\n### table info ends ###" 48 | } 49 | ] 50 | }, 51 | { 52 | "role": "user", 53 | "content": [ 54 | { 55 | "type": "text", 56 | "text": "add columns to food_entries\n fiber(number), net_carbs(number)" 57 | } 58 | ] 59 | } 60 | ], 61 | "model": "gpt-4-turbo", 62 | "caching": true, 63 | "RawResponse": "{\n \"FunctionName\": \"Execute\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"ALTER TABLE food_entries ADD COLUMN fiber NUMERIC; ALTER TABLE food_entries ADD COLUMN net_carbs NUMERIC;\"\n }\n ]\n}" 64 | }, 65 | "RunOnBuild": false 66 | } -------------------------------------------------------------------------------- /.build/knowledge/Insert/08. OutputUpdateCommand.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Write", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "content", 8 | "Value": "%updateCommand%" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "write out %updateCommand%", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.OutputModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nString Ask(String text, String? type = \"text\", Int32? statusCode = 200, String? regexPattern, String? errorMessage) // Send response to user and waits for answer. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. regexPattern should contain start and end character if user input needs to match fully. errorMessage is message to user when answer does not match expected regexPattern, use good grammar and correct formatting.. \nvoid Write(Object? content, Boolean? writeToBuffer = False, String? type = \"text\", Int32? statusCode = 200) // Write to the output. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. type=error should have statusCode between 400-599, depending on text.\r\n## functions available ends ##\r\n## defined variables ##\r\nupdateCommand (type:String), \r\n## defined variables ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "write out %updateCommand%" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Write\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"content\",\n \"Value\": \"%updateCommand%\"\n }\n ],\n \"ReturnValue\": null\n}" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/Setup/02. CreateSymptomsTable.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "CreateTable", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "sql", 8 | "Value": "CREATE TABLE symptoms (id BIGINT PRIMARY KEY, food_entry_id BIGINT REFERENCES food_entries(id), description TEXT NOT NULL, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP);" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "create table symptoms, columns:\n food_entry_id(foreign key to food_entries)\n description(string, not null)\n created(datetime, default current date)", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.DbModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Map user command to this c# function: \r\n\r\n## csharp function ##\r\nvoid CreateTable(String sql) \r\n## csharp function ##\r\n\r\nIf table name is a variable, keep the variable in the sql statement\r\nvariable is defined with starting and ending %, e.g. %filePath%.\r\nYou MUST generate a valid sql statement for PostgreSQL.\r\nYou MUST add id to create statement.\r\nIf id is not defined then add id to the create statement. \r\nThe id MUST NOT be auto incremental, but is primary key.\r\nThe id should be datatype long/bigint/.. which fits PostgreSQL.\r\n" 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nvoid CreateDataSource(String name, String? dbType, Boolean? setAsDefaultForApp = False, Boolean? keepHistoryEventSourcing = False) \nvoid SetDataSouceName(String name) \nvoid BeginTransaction() \nvoid EndTransaction() \nvoid LoadExtension(String fileName, String? procName) \nString GetDatabaseStructure() // Returns tables and views in database with the columns description. \nInt32 Execute(String sql) \nvoid CreateTable(String sql) \nObject SelectOneRow(String sql, List`1? SqlParameters) \nList`1 Select(String sql, List`1? SqlParameters) \nInt32 Update(String sql, List`1? SqlParameters) \nInt32 Delete(String sql, List`1? SqlParameters) \nInt32 Insert(String sql, List`1? SqlParameters) // Basic insert statement. Will return affected row count. \nObject InsertAndSelectIdOfInsertedRow(String sql, List`1? SqlParameters) // Insert statement that will return the id of the inserted row. Use only if user requests the id. \nInt32 InsertBulk(String tableName, List`1 items) // Insert a list(bulk) into database, return number of rows inserted. \nString GetAdditionalSystemErrorInfo() \nString GetAdditionalAssistantErrorInfo()\r\n## functions available ends ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "create table symptoms, columns:\n food_entry_id(foreign key to food_entries)\n description(string, not null)\n created(datetime, default current date)" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "```json\n{\n \"FunctionName\": \"CreateTable\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"sql\",\n \"Value\": \"CREATE TABLE symptoms (id BIGINT PRIMARY KEY, food_entry_id BIGINT REFERENCES food_entries(id), description TEXT NOT NULL, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP);\"\n }\n ]\n}\n```" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/ShowLastFiveDays/02. ForEachPrintEntry.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "RunLoop", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "variableToLoopThrough", 8 | "Value": "%lastFiveDays%" 9 | }, 10 | { 11 | "Type": "String", 12 | "Name": "goalNameToCall", 13 | "Value": "!PrintEntry" 14 | }, 15 | { 16 | "Type": "Dictionary`2", 17 | "Name": "parameters", 18 | "Value": null 19 | } 20 | ], 21 | "ReturnValue": null 22 | }, 23 | "Text": "foreach item in %lastFiveDays%, call !PrintEntry", 24 | "Reload": false, 25 | "LlmRequest": { 26 | "temperature": 0.0, 27 | "top_p": 0.0, 28 | "frequencyPenalty": 0.0, 29 | "presencePenalty": 0.0, 30 | "maxLength": 4000, 31 | "llmResponseType": "json", 32 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 33 | "type": "PLang.Modules.GenericFunctionBuilder", 34 | "promptMessage": [ 35 | { 36 | "role": "system", 37 | "content": [ 38 | { 39 | "type": "text", 40 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 41 | }, 42 | { 43 | "type": "text", 44 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "assistant", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "## functions available starts ##\r\nvoid RunLoop(String variableToLoopThrough, String goalNameToCall, Dictionary`2? parameters) // Call another Goal, when ! is prefixed, e.g. !RenameFile or !Google/Search, parameters are sent to the goal being called.\r\n## functions available ends ##\r\n## defined variables ##\r\nlastFiveDays (type:System.Object), \r\n## defined variables ##" 54 | } 55 | ] 56 | }, 57 | { 58 | "role": "user", 59 | "content": [ 60 | { 61 | "type": "text", 62 | "text": "foreach item in %lastFiveDays%, call !PrintEntry" 63 | } 64 | ] 65 | } 66 | ], 67 | "model": "gpt-4-turbo", 68 | "caching": true, 69 | "RawResponse": "{\n \"FunctionName\": \"RunLoop\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"variableToLoopThrough\",\n \"Value\": \"%lastFiveDays%\"\n },\n {\n \"Type\": \"String\",\n \"Name\": \"goalNameToCall\",\n \"Value\": \"!PrintEntry\"\n },\n {\n \"Type\": \"Dictionary`2\",\n \"Name\": \"parameters\",\n \"Value\": null\n }\n ],\n \"ReturnValue\": null\n}" 70 | }, 71 | "RunOnBuild": false 72 | } -------------------------------------------------------------------------------- /.build/entry/Update/07. OutputSQLAndExplanation.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Write", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "content", 8 | "Value": "%sql% - %explain%" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "write out '%sql% - %explain%'", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.OutputModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nString Ask(String text, String? type = \"text\", Int32? statusCode = 200, String? regexPattern, String? errorMessage) // Send response to user and waits for answer. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. regexPattern should contain start and end character if user input needs to match fully. errorMessage is message to user when answer does not match expected regexPattern, use good grammar and correct formatting.. \nvoid Write(Object? content, Boolean? writeToBuffer = False, String? type = \"text\", Int32? statusCode = 200) // Write to the output. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. type=error should have statusCode between 400-599, depending on text.\r\n## functions available ends ##\r\n## defined variables ##\r\nsql (type:String), explain (type:object), \r\n## defined variables ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "write out '%sql% - %explain%'" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Write\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"content\",\n \"Value\": \"%sql% - %explain%\"\n }\n ],\n \"ReturnValue\": null\n}" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/actions/Update/08. OutputSQLAndExplanation.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Write", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "content", 8 | "Value": "%sql% - %explain%" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "write out '%sql% - %explain%'", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.OutputModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nString Ask(String text, String? type = \"text\", Int32? statusCode = 200, String? regexPattern, String? errorMessage) // Send response to user and waits for answer. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. regexPattern should contain start and end character if user input needs to match fully. errorMessage is message to user when answer does not match expected regexPattern, use good grammar and correct formatting.. \nvoid Write(Object? content, Boolean? writeToBuffer = False, String? type = \"text\", Int32? statusCode = 200) // Write to the output. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. type=error should have statusCode between 400-599, depending on text.\r\n## functions available ends ##\r\n## defined variables ##\r\nsql (type:String), explain (type:object), \r\n## defined variables ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "write out '%sql% - %explain%'" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Write\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"content\",\n \"Value\": \"%sql% - %explain%\"\n }\n ],\n \"ReturnValue\": null\n}" 60 | }, 61 | "RunOnBuild": false 62 | } -------------------------------------------------------------------------------- /.build/knowledge/Query/02. ProcessKnowledgeItems.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "RunLoop", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "variableToLoopThrough", 8 | "Value": "%knowledge%" 9 | }, 10 | { 11 | "Type": "String", 12 | "Name": "goalNameToCall", 13 | "Value": "!CreateKnowledgeText" 14 | }, 15 | { 16 | "Type": "Dictionary`2", 17 | "Name": "parameters", 18 | "Value": null 19 | } 20 | ], 21 | "ReturnValue": null 22 | }, 23 | "Text": "foreach %knowledge% call !CreateKnowledgeText", 24 | "Reload": false, 25 | "LlmRequest": { 26 | "temperature": 0.0, 27 | "top_p": 0.0, 28 | "frequencyPenalty": 0.0, 29 | "presencePenalty": 0.0, 30 | "maxLength": 4000, 31 | "llmResponseType": "json", 32 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 33 | "type": "PLang.Modules.GenericFunctionBuilder", 34 | "promptMessage": [ 35 | { 36 | "role": "system", 37 | "content": [ 38 | { 39 | "type": "text", 40 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 41 | }, 42 | { 43 | "type": "text", 44 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "assistant", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "## functions available starts ##\r\nvoid RunLoop(String variableToLoopThrough, String goalNameToCall, Dictionary`2? parameters) // Call another Goal, when ! is prefixed, e.g. !RenameFile or !Google/Search, parameters are sent to the goal being called.\r\n## functions available ends ##\r\n## defined variables ##\r\nknowledge (type:System.String), \r\n## defined variables ##" 54 | } 55 | ] 56 | }, 57 | { 58 | "role": "user", 59 | "content": [ 60 | { 61 | "type": "text", 62 | "text": "foreach %knowledge% call !CreateKnowledgeText" 63 | } 64 | ] 65 | } 66 | ], 67 | "model": "gpt-4-turbo", 68 | "caching": true, 69 | "RawResponse": "{\n \"FunctionName\": \"RunLoop\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"variableToLoopThrough\",\n \"Value\": \"%knowledge%\"\n },\n {\n \"Type\": \"String\",\n \"Name\": \"goalNameToCall\",\n \"Value\": \"!CreateKnowledgeText\"\n },\n {\n \"Type\": \"Dictionary`2\",\n \"Name\": \"parameters\",\n \"Value\": null\n }\n ],\n \"ReturnValue\": null\n}" 70 | }, 71 | "RunOnBuild": false 72 | } -------------------------------------------------------------------------------- /.build/knowledge/Delete/NotFound/01. ProcessKnowledgeItems.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "RunLoop", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "variableToLoopThrough", 8 | "Value": "%knowledge%" 9 | }, 10 | { 11 | "Type": "String", 12 | "Name": "goalNameToCall", 13 | "Value": "!CreateKnowledgeText" 14 | }, 15 | { 16 | "Type": "Dictionary`2", 17 | "Name": "parameters", 18 | "Value": null 19 | } 20 | ], 21 | "ReturnValue": null 22 | }, 23 | "Text": "foreach %knowledge% call !CreateKnowledgeText", 24 | "Reload": false, 25 | "LlmRequest": { 26 | "temperature": 0.0, 27 | "top_p": 0.0, 28 | "frequencyPenalty": 0.0, 29 | "presencePenalty": 0.0, 30 | "maxLength": 4000, 31 | "llmResponseType": "json", 32 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 33 | "type": "PLang.Modules.GenericFunctionBuilder", 34 | "promptMessage": [ 35 | { 36 | "role": "system", 37 | "content": [ 38 | { 39 | "type": "text", 40 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 41 | }, 42 | { 43 | "type": "text", 44 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "assistant", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "## functions available starts ##\r\nvoid RunLoop(String variableToLoopThrough, String goalNameToCall, Dictionary`2? parameters) // Call another Goal, when ! is prefixed, e.g. !RenameFile or !Google/Search, parameters are sent to the goal being called.\r\n## functions available ends ##\r\n## defined variables ##\r\nknowledge (type:object), \r\n## defined variables ##" 54 | } 55 | ] 56 | }, 57 | { 58 | "role": "user", 59 | "content": [ 60 | { 61 | "type": "text", 62 | "text": "foreach %knowledge% call !CreateKnowledgeText" 63 | } 64 | ] 65 | } 66 | ], 67 | "model": "gpt-4-turbo", 68 | "caching": true, 69 | "RawResponse": "{\n \"FunctionName\": \"RunLoop\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"variableToLoopThrough\",\n \"Value\": \"%knowledge%\"\n },\n {\n \"Type\": \"String\",\n \"Name\": \"goalNameToCall\",\n \"Value\": \"!CreateKnowledgeText\"\n },\n {\n \"Type\": \"Dictionary`2\",\n \"Name\": \"parameters\",\n \"Value\": null\n }\n ],\n \"ReturnValue\": null\n}" 70 | }, 71 | "RunOnBuild": false 72 | } -------------------------------------------------------------------------------- /.build/Settings/DeleteEntry/02. ForEachEntry.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "RunLoop", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "variableToLoopThrough", 8 | "Value": "%entries%" 9 | }, 10 | { 11 | "Type": "String", 12 | "Name": "goalNameToCall", 13 | "Value": "!ShowEntryToDelete" 14 | }, 15 | { 16 | "Type": "Dictionary`2", 17 | "Name": "parameters", 18 | "Value": null 19 | } 20 | ], 21 | "ReturnValue": null 22 | }, 23 | "Text": "foreach %entries% call !ShowEntryToDelete", 24 | "Reload": false, 25 | "LlmRequest": { 26 | "temperature": 0.0, 27 | "top_p": 0.0, 28 | "frequencyPenalty": 0.0, 29 | "presencePenalty": 0.0, 30 | "maxLength": 4000, 31 | "llmResponseType": "json", 32 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 33 | "type": "PLang.Modules.GenericFunctionBuilder", 34 | "promptMessage": [ 35 | { 36 | "role": "system", 37 | "content": [ 38 | { 39 | "type": "text", 40 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 41 | }, 42 | { 43 | "type": "text", 44 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 45 | } 46 | ] 47 | }, 48 | { 49 | "role": "assistant", 50 | "content": [ 51 | { 52 | "type": "text", 53 | "text": "## functions available starts ##\r\nvoid RunLoop(String variableToLoopThrough, String goalNameToCall, Dictionary`2? parameters) // Call another Goal, when ! is prefixed, e.g. !RenameFile or !Google/Search, parameters are sent to the goal being called.\r\n## functions available ends ##\r\n## defined variables ##\r\nentries (type:System.Collections.Generic.List`1[System.Object]), \r\n## defined variables ##" 54 | } 55 | ] 56 | }, 57 | { 58 | "role": "user", 59 | "content": [ 60 | { 61 | "type": "text", 62 | "text": "foreach %entries% call !ShowEntryToDelete" 63 | } 64 | ] 65 | } 66 | ], 67 | "model": "gpt-4-turbo", 68 | "caching": true, 69 | "RawResponse": "{\n \"FunctionName\": \"RunLoop\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"variableToLoopThrough\",\n \"Value\": \"%entries%\"\n },\n {\n \"Type\": \"String\",\n \"Name\": \"goalNameToCall\",\n \"Value\": \"!ShowEntryToDelete\"\n },\n {\n \"Type\": \"Dictionary`2\",\n \"Name\": \"parameters\",\n \"Value\": null\n }\n ],\n \"ReturnValue\": null\n}" 70 | }, 71 | "RunOnBuild": false 72 | } -------------------------------------------------------------------------------- /.build/actions/Delete/08. OutputSQLAndExplain.pr: -------------------------------------------------------------------------------- 1 | { 2 | "Action": { 3 | "FunctionName": "Write", 4 | "Parameters": [ 5 | { 6 | "Type": "String", 7 | "Name": "content", 8 | "Value": "sql:%sql% - explain:%explain%" 9 | } 10 | ], 11 | "ReturnValue": null 12 | }, 13 | "Text": "write out 'sql:%sql% - explain:%explain%'", 14 | "Reload": false, 15 | "LlmRequest": { 16 | "temperature": 0.0, 17 | "top_p": 0.0, 18 | "frequencyPenalty": 0.0, 19 | "presencePenalty": 0.0, 20 | "maxLength": 4000, 21 | "llmResponseType": "json", 22 | "scheme": "{\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}", 23 | "type": "PLang.Modules.OutputModule.Builder", 24 | "promptMessage": [ 25 | { 26 | "role": "system", 27 | "content": [ 28 | { 29 | "type": "text", 30 | "text": "Your job is: \r\n1. Parse user intent\r\n2. Map the intent to one of C# function provided to you\r\n3. Return a valid JSON\r\n\r\nVariable is defined with starting and ending %, e.g. %filePath%. \r\nVariables MUST be wrapped in quotes(\") in json response, e.g. { \"name\":\"%name%\" }\r\nVariables should not be changed, they can include dot(.) and parentheses()\r\nKeep \\n, \\r, \\t that are submitted to you for string variables\r\n\r\nIf there is some api key, settings, config replace it with %Settings.Get(\"settingName\", \"defaultValue\", \"Explain\")% \r\n- settingName would be the api key, config key, \r\n- defaultValue for settings is the usual value given, make it \"\" if no value can be default\r\n- Explain is an explanation about the setting that novice user can understand.\r\n\r\nJSON scheme information\r\nFunctionName: Name of the function to use from list of functions, if no function matches set as \"N/A\"\r\nParameters: List of parameters that are needed according to the user intent.\r\n- Type: the object type in c#\r\n- Name: name of the variable\r\n- Value: \"%variable%\" or hardcode string that should be used\r\nReturnValue rules\r\n- Only if the function returns a value AND if user defines %variable% to write into, e.g. ' write into %data%' or 'into %result%', or simliar intent to write return value into variable\r\n- If no %variable% is defined then set as null." 31 | }, 32 | { 33 | "type": "text", 34 | "text": "You MUST respond in JSON, scheme:\r\n {\"FunctionName\": string,\n\"Parameters\": [{\"Type\": string,\n\"Name\": string,\n\"Value\": object}],\n\"ReturnValue\"?: [{\"Type\": string,\n\"VariableName\": string}] = null}" 35 | } 36 | ] 37 | }, 38 | { 39 | "role": "assistant", 40 | "content": [ 41 | { 42 | "type": "text", 43 | "text": "## functions available starts ##\r\nString Ask(String text, String? type = \"text\", Int32? statusCode = 200, String? regexPattern, String? errorMessage) // Send response to user and waits for answer. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. regexPattern should contain start and end character if user input needs to match fully. errorMessage is message to user when answer does not match expected regexPattern, use good grammar and correct formatting.. \nvoid Write(Object? content, Boolean? writeToBuffer = False, String? type = \"text\", Int32? statusCode = 200) // Write to the output. type can be text|warning|error|info|debug|trace. statusCode(like http status code) should be defined by user. type=error should have statusCode between 400-599, depending on text.\r\n## functions available ends ##\r\n## defined variables ##\r\nsql (type:object), explain (type:object), \r\n## defined variables ##" 44 | } 45 | ] 46 | }, 47 | { 48 | "role": "user", 49 | "content": [ 50 | { 51 | "type": "text", 52 | "text": "write out 'sql:%sql% - explain:%explain%'" 53 | } 54 | ] 55 | } 56 | ], 57 | "model": "gpt-4-turbo", 58 | "caching": true, 59 | "RawResponse": "{\n \"FunctionName\": \"Write\",\n \"Parameters\": [\n {\n \"Type\": \"String\",\n \"Name\": \"content\",\n \"Value\": \"sql:%sql% - explain:%explain%\"\n }\n ]\n}" 60 | }, 61 | "RunOnBuild": false 62 | } --------------------------------------------------------------------------------