mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
fix: improve eval
This commit is contained in:
@@ -39,14 +39,14 @@ function getSchema(allowReflect: boolean, allowRead: boolean, allowAnswer: boole
|
|||||||
|
|
||||||
if (allowAnswer) {
|
if (allowAnswer) {
|
||||||
actions.push("answer");
|
actions.push("answer");
|
||||||
properties.answer = z.string()
|
|
||||||
.describe(`Required when action='answer'. Must in ${languageStyle}. Use markdown footnote syntax like [^1], [^2] to refer the corresponding reference item`).optional();
|
|
||||||
properties.references = z.array(
|
properties.references = z.array(
|
||||||
z.object({
|
z.object({
|
||||||
exactQuote: z.string().describe("Exact relevant quote from the document"),
|
exactQuote: z.string().describe("Exact relevant quote from the document"),
|
||||||
url: z.string().describe("source URL; must be directly from the context")
|
url: z.string().describe("source URL; must be directly from the context")
|
||||||
}).required()
|
}).required()
|
||||||
).describe("Required when action='answer'. Must be an array of references that support the answer, each reference must contain an exact quote and the URL of the document").optional();
|
).describe("Required when action='answer'. Must be an array of references that support the answer, each reference must contain an exact quote and the URL of the document").optional();
|
||||||
|
properties.answer = z.string()
|
||||||
|
.describe(`Required when action='answer'. Must in ${languageStyle}. Use markdown footnote syntax like [^1], [^2] to refer the corresponding reference item`).optional();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (allowReflect) {
|
if (allowReflect) {
|
||||||
|
|||||||
Reference in New Issue
Block a user