@nexo-labs/payload-typesense 1.5.0 → 1.5.2
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.d.mts +2 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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));
|
|
@@ -2559,7 +2559,7 @@ const getEmbeddingField = (optional = true, dimensions = DEFAULT_EMBEDDING_DIMEN
|
|
|
2559
2559
|
...optional && { optional: true }
|
|
2560
2560
|
});
|
|
2561
2561
|
/**
|
|
2562
|
-
* Maps
|
|
2562
|
+
* Maps TypesenseFieldMapping to TypesenseFieldSchema
|
|
2563
2563
|
*/
|
|
2564
2564
|
const mapFieldMappingsToSchema = (fields) => {
|
|
2565
2565
|
return fields.map((field) => ({
|