mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
jina-ai: fix promptContext check
This commit is contained in:
@@ -128,7 +128,7 @@ export const jinaAiMiddleware = (req: Request, res: Response, next: NextFunction
|
||||
chargeAmount,
|
||||
});
|
||||
|
||||
if (ctx.promptContext.knowledge?.length) {
|
||||
if (ctx.promptContext?.knowledge?.length) {
|
||||
Promise.all(ctx.promptContext.knowledge.map((x: any) => KnowledgeItem.save(
|
||||
KnowledgeItem.from({
|
||||
...x,
|
||||
|
||||
Reference in New Issue
Block a user