mirror of
https://github.com/jcreek/AutomatedAssessmentFeedbackAgent.git
synced 2026-07-13 02:53:49 +00:00
feat(*): Add further tools
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
import { DefaultAzureCredential } from '@azure/identity';
|
||||
import { AIProjectsClient } from '@azure/ai-projects';
|
||||
import { rubricMatcherTool } from '../tools/rubricMatcherTool';
|
||||
import { essayAnalyzerTool } from '../tools/essayAnalyzerTool';
|
||||
import { ToolUtility } from '@azure/ai-projects';
|
||||
import { AI_FOUNDRY_PROJECT_CONNECTION_STRING, AI_MODEL } from '$env/static/private';
|
||||
|
||||
import {
|
||||
rubricMatcherTool,
|
||||
essayAnalyzerTool,
|
||||
conceptVerifierTool,
|
||||
feedbackGeneratorTool,
|
||||
metacognitiveReflectionPromptTool,
|
||||
selfAssessmentTool,
|
||||
spellingAndGrammarCheckerTool
|
||||
} from '../tools/index';
|
||||
|
||||
const connectionString = AI_FOUNDRY_PROJECT_CONNECTION_STRING;
|
||||
if (!connectionString) {
|
||||
throw new Error('AI_FOUNDRY_PROJECT_CONNECTION_STRING is not set in environment variables');
|
||||
@@ -22,18 +30,32 @@ const client = AIProjectsClient.fromConnectionString(
|
||||
|
||||
const codeInterpreterTool = ToolUtility.createCodeInterpreterTool([]);
|
||||
|
||||
const tools = [codeInterpreterTool.definition, rubricMatcherTool.definition, essayAnalyzerTool.definition];
|
||||
const tools = [
|
||||
codeInterpreterTool.definition,
|
||||
rubricMatcherTool.definition,
|
||||
essayAnalyzerTool.definition,
|
||||
conceptVerifierTool.definition,
|
||||
feedbackGeneratorTool.definition,
|
||||
metacognitiveReflectionPromptTool.definition,
|
||||
selfAssessmentTool.definition,
|
||||
spellingAndGrammarCheckerTool.definition
|
||||
];
|
||||
|
||||
const instructions = "You are a helpful agent that can assist with providing feedback on a student's work for a teacher.";
|
||||
const instructions = "You are a helpful agent that can assist with providing feedback on a student's work for a teacher. You are familiar with all modern pedagogy around summative and formative assessment, and K12 education, and primary and secondary education.";
|
||||
|
||||
const toolResources = {
|
||||
...codeInterpreterTool.resources,
|
||||
matchRubric: {},
|
||||
analyzeEssay: {}
|
||||
analyzeEssay: {},
|
||||
conceptVerifier: {},
|
||||
feedbackGenerator: {},
|
||||
metacognitiveReflectionPrompt: {},
|
||||
selfAssessment: {},
|
||||
spellingAndGrammarChecker: {}
|
||||
};
|
||||
|
||||
const agent = await client.agents.createAgent(aiModel, {
|
||||
name: `agent-assessment-feedback`,
|
||||
name: `assessment-feedback-agent`,
|
||||
instructions,
|
||||
temperature: 0.5,
|
||||
tools,
|
||||
|
||||
Reference in New Issue
Block a user