@nexo-labs/payload-typesense 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1601,7 +1601,7 @@ function createAgentsGETHandler(config) {
1601
1601
  */
1602
1602
  function createRAGPayloadHandlers(config) {
1603
1603
  const endpoints = [];
1604
- if (!config.agents || config.agents.length === 0) return endpoints;
1604
+ if (!config.agents || config.agents.length === 0 || !config.callbacks) return endpoints;
1605
1605
  const { agents, callbacks, typesense } = config;
1606
1606
  const agentCollections = agents.flatMap((agent) => agent.searchCollections) || [];
1607
1607
  const validCollections = Array.from(new Set(agentCollections));