mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
jina-ai: fix promptContext check
This commit is contained in:
parent
3b76e0b4d8
commit
7743accfb3
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user