From 215db0c35070ca65856c49274fdcce026a45076e Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 24 May 2024 10:32:02 -0400 Subject: fixes #30 --- README.md | 1 + main.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ba8ed4..520f8c2 100644 --- a/README.md +++ b/README.md @@ -254,6 +254,7 @@ prompt= "given all the data, summarize the news for me" In the above example digest and summarize will be the names of the commands: `milla: /cmd summarize`.
Currently you should only ask for the log column in the query. Asking for the other column will result in the query not succeeding.
The `limit` parameter limits the number of SQL queries that are used to generate the response. Whether you hit the token limit of the provider you use and the cost is something you should be aware of.
+A `limit` value of 0 disables the limit on the amount of rows that are passed to milla.
NOTE: since each milla instance can have its own database, all instances might not necessarily have access to all the data milla is gathering. If you use the same database for all the instances, all instances will have access to all the gathered data.
### Example Config File diff --git a/main.go b/main.go index db2a31b..6d08e63 100644 --- a/main.go +++ b/main.go @@ -400,8 +400,11 @@ func handleCustomCommand( return } + if customCommand.Limit != 0 { + logs = logs[:customCommand.Limit] + } + log.Println(logs) - logs = logs[:customCommand.Limit] if err != nil { log.Println(err.Error()) -- cgit v1.2.3