chore: add more agent upcoming features
This commit is contained in:
@@ -187,7 +187,13 @@ async function executeAgentTool<TArgs, TResult>(
|
||||
}
|
||||
}
|
||||
|
||||
export function buildAgentTools(orgId: string, userId: string, courseId: string, priorMessages: unknown[]) {
|
||||
export function buildAgentTools(
|
||||
orgId: string,
|
||||
userId: string,
|
||||
courseId: string,
|
||||
priorMessages: unknown[],
|
||||
_options?: { isOrgOnPaidPlan?: boolean }
|
||||
) {
|
||||
return {
|
||||
get_course_structure: tool({
|
||||
description:
|
||||
|
||||
@@ -29,6 +29,7 @@ export interface CreateAgentRunStateInput {
|
||||
executionCursor?: Record<string, unknown>;
|
||||
sourceIds?: string[];
|
||||
modelSummary?: string;
|
||||
modelId?: string;
|
||||
}
|
||||
|
||||
export interface AgentRunDetail {
|
||||
@@ -107,6 +108,11 @@ export async function createAgentRunState(input: CreateAgentRunStateInput): Prom
|
||||
await assertCourseRunAccess(input.courseId, input.userId, input.orgId);
|
||||
await assertConversationBelongsToCourse(input.conversationId, input.courseId, input.userId);
|
||||
|
||||
const executionCursor = {
|
||||
...(input.executionCursor ?? {}),
|
||||
...(input.modelId ? { modelId: input.modelId } : {})
|
||||
};
|
||||
|
||||
const run = await createAgentRun({
|
||||
orgId: input.orgId,
|
||||
courseId: input.courseId,
|
||||
@@ -114,7 +120,7 @@ export async function createAgentRunState(input: CreateAgentRunStateInput): Prom
|
||||
userId: input.userId,
|
||||
phase: input.phase,
|
||||
approvedPlan: input.approvedPlan ?? null,
|
||||
executionCursor: input.executionCursor,
|
||||
executionCursor,
|
||||
sourceIds: input.sourceIds,
|
||||
modelSummary: input.modelSummary
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user