-
Notifications
You must be signed in to change notification settings - Fork 267
Open
Labels
investigatingneeds attentionThis issue needs the attention of a contributor.This issue needs the attention of a contributor.
Description
Following the article https://learn.microsoft.com/en-us/microsoft-agent-365/developer/quickstart-nodejs-langchain
Created the LangChain sample from the toolkit samples gallery
npm run build fails with
> [email protected] build
> tsc
src/client.ts:37:3 - error TS2769: No overload matches this call.
The last overload gave the following error.
Object literal may only specify known properties, and 'instructions' does not exist in type 'CreateAgentParams<Record<string, any>, undefined, AnyAnnotationRoot, ResponseFormat> & { responseFormat: ResponseFormat; middleware?: readonly AgentMiddleware<...>[] | undefined; }'.
37 instructions: `You are a helpful assistant with access to tools.
~~~~~~~~~~~~
node_modules/langchain/dist/agents/index.d.cts:183:18
183 declare function createAgent<StructuredResponseFormat extends Record<string, any> = Record<string, any>, StateSchema extends AnyAnnotationRoot | InteropZodObject | undefined = undefined, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, const TMiddleware extends readonly AgentMiddleware[] = readonly AgentMiddleware[]>(params: CreateAgentParams<StructuredResponseFormat, StateSchema, ContextSchema, ResponseFormat> & {
~~~~~~~~~~~
The last overload is declared here.
src/client.ts:73:43 - error TS2554: Expected 5 arguments, but got 4.
~~~~~~~~~~~~~~~~~~~~~
node_modules/@microsoft/agents-a365-tooling-extensions-langchain/dist/esm/McpToolRegistrationService.d.ts:19:127
19 addToolServersToAgent(agent: ReactAgent, authorization: Authorization, authHandlerName: string, turnContext: TurnContext, authToken: string): Promise<ReactAgent>;
~~~~~~~~~~~~~~~~~
An argument for 'authToken' was not provided.
Found 2 errors in the same file, starting at: src/client.ts:37
Metadata
Metadata
Assignees
Labels
investigatingneeds attentionThis issue needs the attention of a contributor.This issue needs the attention of a contributor.