aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-05-24 14:32:02 +0000
committerterminaldweller <devi@terminaldweller.com>2024-05-24 14:32:02 +0000
commit215db0c35070ca65856c49274fdcce026a45076e (patch)
treebf124c385b0bfaaa6bcd0abf0f0077dd85892ba0
parentfixes #24, fixes #25, fixes #29 (diff)
downloadmilla-215db0c35070ca65856c49274fdcce026a45076e.tar.gz
milla-215db0c35070ca65856c49274fdcce026a45076e.zip
fixes #30v1.0.0
Diffstat (limited to '')
-rw-r--r--README.md1
-rw-r--r--main.go5
2 files changed, 5 insertions, 1 deletions
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`.<br/>
Currently you should only ask for the log column in the query. Asking for the other column will result in the query not succeeding.<br/>
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.<br/>
+A `limit` value of 0 disables the limit on the amount of rows that are passed to milla.<br/>
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.<br/>
### 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())