mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
30 lines
609 B
TypeScript
30 lines
609 B
TypeScript
type BaseAction = {
|
|
action: "search" | "answer" | "reflect" | "visit";
|
|
thoughts: string;
|
|
};
|
|
|
|
export type SearchAction = BaseAction & {
|
|
action: "search";
|
|
searchQuery: string;
|
|
};
|
|
|
|
export type AnswerAction = BaseAction & {
|
|
action: "answer";
|
|
answer: string;
|
|
references: Array<{
|
|
exactQuote: string;
|
|
url: string;
|
|
}>;
|
|
};
|
|
|
|
export type ReflectAction = BaseAction & {
|
|
action: "reflect";
|
|
questionsToAnswer: string[];
|
|
};
|
|
|
|
export type VisitAction = BaseAction & {
|
|
action: "visit";
|
|
URLTargets: string[];
|
|
};
|
|
|
|
export type StepAction = SearchAction | AnswerAction | ReflectAction | VisitAction; |