gptscript-ai / knowledge

Knowledge for GPTScript
https://gptscript-ai.github.io/knowledge/
Apache License 2.0
24 stars 11 forks source link

change: no error on empty collection, so that the LLM session can 'recover' from the tool call #26

Closed iwilltry42 closed 3 months ago

iwilltry42 commented 3 months ago

The error nResults must be > 0 often happens because we reduce the number of requested documents to be <= the number of available documents in a dataset. If the dataset is empty, this is not actually a hard error but something that we can let the LLM session (GPTScript) know without erroring out.