mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
jina-ai: omit results in context
This commit is contained in:
parent
bc2f187343
commit
13cfd57dbb
@ -166,8 +166,13 @@ export const jinaAiMiddleware = (req: Request, res: Response, next: NextFunction
|
||||
});
|
||||
}
|
||||
if (ctx.promptContext) {
|
||||
const patchedCtx = { ...ctx.promptContext };
|
||||
if (Array.isArray(patchedCtx.context)) {
|
||||
patchedCtx.context = patchedCtx.context.map((x: object) => ({ ...x, result: undefined }))
|
||||
}
|
||||
|
||||
firebaseDefaultBucket.file(`promptContext/${ctx.traceId}.json`).save(
|
||||
JSON.stringify(ctx.promptContext),
|
||||
JSON.stringify(patchedCtx),
|
||||
{
|
||||
metadata: {
|
||||
contentType: 'application/json',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user