mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-12-14 15:48:15 +00:00
feat(researcher): pass research block id
This commit is contained in:
@@ -50,7 +50,7 @@ class ActionRegistry {
|
|||||||
static async execute(
|
static async execute(
|
||||||
name: string,
|
name: string,
|
||||||
params: any,
|
params: any,
|
||||||
additionalConfig: AdditionalConfig,
|
additionalConfig: AdditionalConfig & { researchBlockId: string },
|
||||||
) {
|
) {
|
||||||
const action = this.actions.get(name);
|
const action = this.actions.get(name);
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ class ActionRegistry {
|
|||||||
|
|
||||||
static async executeAll(
|
static async executeAll(
|
||||||
actions: ToolCall[],
|
actions: ToolCall[],
|
||||||
additionalConfig: AdditionalConfig,
|
additionalConfig: AdditionalConfig & { researchBlockId: string },
|
||||||
): Promise<ActionOutput[]> {
|
): Promise<ActionOutput[]> {
|
||||||
const results: ActionOutput[] = [];
|
const results: ActionOutput[] = [];
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ export type ResearcherInput = {
|
|||||||
|
|
||||||
export type ResearcherOutput = {
|
export type ResearcherOutput = {
|
||||||
findings: ActionOutput[];
|
findings: ActionOutput[];
|
||||||
|
searchFindings: Chunk[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type SearchActionOutput = {
|
export type SearchActionOutput = {
|
||||||
@@ -103,6 +104,8 @@ export interface ResearchAction<
|
|||||||
enabled: (config: { classification: ClassifierOutput }) => boolean;
|
enabled: (config: { classification: ClassifierOutput }) => boolean;
|
||||||
execute: (
|
execute: (
|
||||||
params: z.infer<TSchema>,
|
params: z.infer<TSchema>,
|
||||||
additionalConfig: AdditionalConfig,
|
additionalConfig: AdditionalConfig & {
|
||||||
|
researchBlockId: string;
|
||||||
|
},
|
||||||
) => Promise<ActionOutput>;
|
) => Promise<ActionOutput>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user