Skip to content

Commit 089271c

Browse files
committed
jacob comments
1 parent 7abc1f2 commit 089271c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/evaluation/tutorials/testing.mdx

+8-8
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const searchTool = new TavilySearchResults({
156156
157157
// Define code tool
158158
const codeTool = tool(
159-
async (input): Promise<string> => {
159+
async (input) => {
160160
const sbx = await Sandbox.create();
161161
const execution = await sbx.runCode(input.code);
162162
if (execution.error) {
@@ -189,7 +189,7 @@ const TickerToolInputSchema = z.object({
189189
const rest = restClient(process.env.POLYGON_API_KEY);
190190
191191
// Define stock ticker tool
192-
const tickerTool = tool(async (query): Promise<string> =>
192+
const tickerTool = tool(async (query) =>
193193
{
194194
const parsed = TickerToolInputSchema.parse(query);
195195
const result = await rest.stocks.aggregates(
@@ -291,7 +291,7 @@ from langsmith import testing as t`,
291291
caption: "Name your test file \`agent.vitest.eval.ts\`",
292292
content: `import { expect } from "vitest";
293293
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
295295
296296
// Optional, but recommended to group tests together
297297
ls.describe("Agent Tests", () => {
@@ -305,7 +305,7 @@ ls.describe("Agent Tests", () => {
305305
caption: "Name your test file \`agent.jest.eval.ts\`",
306306
content: `import { expect } from "@jest/globals";
307307
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
309309
310310
// Optional, but recommended to group tests together
311311
ls.describe("Agent Tests", () => {
@@ -920,7 +920,7 @@ import { tool } from "@langchain/core/tools";
920920
import { z } from "zod";
921921
922922
const codeTool = tool(
923-
async (input): Promise<string> => {
923+
async (input) => {
924924
const sbx = await Sandbox.create();
925925
const execution = await sbx.runCode(input.code);
926926
if (execution.error) {
@@ -952,7 +952,7 @@ const TickerToolInputSchema = z.object({
952952
953953
const rest = restClient(process.env.POLYGON_API_KEY);
954954
955-
const tickerTool = tool(async (query): Promise<string> =>
955+
const tickerTool = tool(async (query) =>
956956
{
957957
const parsed = TickerToolInputSchema.parse(query);
958958
const result = await rest.stocks.aggregates(
@@ -1157,7 +1157,7 @@ def test_grounded_in_source_info() -> None:
11571157
language: "typescript",
11581158
content: `import { expect } from "vitest";
11591159
import * as ls from "langsmith/vitest";
1160-
import agent from "../../src/agent";
1160+
import agent from "../agent";
11611161
import { AIMessage, ToolMessage } from "@langchain/core/messages";
11621162
import { ChatOpenAI } from "@langchain/openai";
11631163
@@ -1271,7 +1271,7 @@ ls.describe("Agent Tests", () => {
12711271
language: "typescript",
12721272
content: `import { expect } from "@jest/globals";
12731273
import * as ls from "langsmith/jest";
1274-
import agent from "../../src/agent";
1274+
import agent from "../agent";
12751275
import { AIMessage } from "@langchain/core/messages";
12761276
import { ChatOpenAI } from "@langchain/openai";
12771277

0 commit comments

Comments
 (0)