@msbayindir/context-rag 1.0.0-beta.4 → 1.0.0-beta.5
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.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1919,6 +1919,7 @@ ${userContent}` }]
|
|
|
1919
1919
|
responseMimeType: "application/json",
|
|
1920
1920
|
// Cast to any because the new schema format might have slight type mismatch
|
|
1921
1921
|
// but is valid for the API
|
|
1922
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1922
1923
|
responseSchema: zodToGeminiSchema(schema),
|
|
1923
1924
|
temperature: options?.temperature ?? 0.2,
|
|
1924
1925
|
maxOutputTokens: options?.maxOutputTokens
|
|
@@ -1963,11 +1964,7 @@ Please fix the JSON output to match the schema exactly.` }]
|
|
|
1963
1964
|
throw lastError;
|
|
1964
1965
|
}
|
|
1965
1966
|
} catch (error) {
|
|
1966
|
-
|
|
1967
|
-
this.handleError(error);
|
|
1968
|
-
} catch (handledError) {
|
|
1969
|
-
throw handledError;
|
|
1970
|
-
}
|
|
1967
|
+
this.handleError(error);
|
|
1971
1968
|
lastError = error;
|
|
1972
1969
|
if (attempt <= maxRetries) {
|
|
1973
1970
|
this.logger.warn(`Gemini API error (attempt ${attempt}/${maxRetries + 1}), retrying...`, { error: error.message });
|
|
@@ -2555,7 +2552,10 @@ var IngestionEngine = class {
|
|
|
2555
2552
|
}
|
|
2556
2553
|
}
|
|
2557
2554
|
const textsToEmbed = chunks.map(
|
|
2558
|
-
(c) =>
|
|
2555
|
+
(c) => (
|
|
2556
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2557
|
+
c.enrichedContent ?? c.searchContent
|
|
2558
|
+
)
|
|
2559
2559
|
);
|
|
2560
2560
|
const embeddings = await this.gemini.embedBatch(textsToEmbed);
|
|
2561
2561
|
await this.chunkRepo.createMany(
|