@@ -156,7 +156,7 @@ const searchTool = new TavilySearchResults({
156
156
157
157
// Define code tool
158
158
const codeTool = tool(
159
- async (input): Promise<string> => {
159
+ async (input) => {
160
160
const sbx = await Sandbox.create();
161
161
const execution = await sbx.runCode(input.code);
162
162
if (execution.error) {
@@ -189,7 +189,7 @@ const TickerToolInputSchema = z.object({
189
189
const rest = restClient(process.env.POLYGON_API_KEY);
190
190
191
191
// Define stock ticker tool
192
- const tickerTool = tool(async (query): Promise<string> =>
192
+ const tickerTool = tool(async (query) =>
193
193
{
194
194
const parsed = TickerToolInputSchema.parse(query);
195
195
const result = await rest.stocks.aggregates(
@@ -291,7 +291,7 @@ from langsmith import testing as t`,
291
291
caption: " Name your test file \` agent.vitest.eval.ts\` " ,
292
292
content: ` import { expect } from "vitest";
293
293
import * as ls from "langsmith/vitest";
294
- import agent from "../../src/ agent"; // import from wherever your agent is defined
294
+ import agent from "../agent"; // import from wherever your agent is defined
295
295
296
296
// Optional, but recommended to group tests together
297
297
ls.describe("Agent Tests", () => {
@@ -305,7 +305,7 @@ ls.describe("Agent Tests", () => {
305
305
caption: " Name your test file \` agent.jest.eval.ts\` " ,
306
306
content: ` import { expect } from "@jest/globals";
307
307
import * as ls from "langsmith/jest";
308
- import agent from "../../src/ agent"; // import from wherever your agent is defined
308
+ import agent from "../agent"; // import from wherever your agent is defined
309
309
310
310
// Optional, but recommended to group tests together
311
311
ls.describe("Agent Tests", () => {
@@ -920,7 +920,7 @@ import { tool } from "@langchain/core/tools";
920
920
import { z } from "zod";
921
921
922
922
const codeTool = tool(
923
- async (input): Promise<string> => {
923
+ async (input) => {
924
924
const sbx = await Sandbox.create();
925
925
const execution = await sbx.runCode(input.code);
926
926
if (execution.error) {
@@ -952,7 +952,7 @@ const TickerToolInputSchema = z.object({
952
952
953
953
const rest = restClient(process.env.POLYGON_API_KEY);
954
954
955
- const tickerTool = tool(async (query): Promise<string> =>
955
+ const tickerTool = tool(async (query) =>
956
956
{
957
957
const parsed = TickerToolInputSchema.parse(query);
958
958
const result = await rest.stocks.aggregates(
@@ -1157,7 +1157,7 @@ def test_grounded_in_source_info() -> None:
1157
1157
language: " typescript" ,
1158
1158
content: ` import { expect } from "vitest";
1159
1159
import * as ls from "langsmith/vitest";
1160
- import agent from "../../src/ agent";
1160
+ import agent from "../agent";
1161
1161
import { AIMessage, ToolMessage } from "@langchain/core/messages";
1162
1162
import { ChatOpenAI } from "@langchain/openai";
1163
1163
@@ -1271,7 +1271,7 @@ ls.describe("Agent Tests", () => {
1271
1271
language: " typescript" ,
1272
1272
content: ` import { expect } from "@jest/globals";
1273
1273
import * as ls from "langsmith/jest";
1274
- import agent from "../../src/ agent";
1274
+ import agent from "../agent";
1275
1275
import { AIMessage } from "@langchain/core/messages";
1276
1276
import { ChatOpenAI } from "@langchain/openai";
1277
1277
0 commit comments