Skip to content

Commit

Permalink
remove embed from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dqbd committed Oct 22, 2024
1 parent 3a37732 commit d4a2af4
Showing 1 changed file with 1 addition and 42 deletions.
43 changes: 1 addition & 42 deletions js/src/tests/vercel_exporter.int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@ import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-base";
import { z } from "zod";
import { LangSmithAISDKExporter } from "../wrappers/vercel.js";
import { v4 as uuid } from "uuid";
import {
generateText,
streamText,
generateObject,
streamObject,
embed,
embedMany,
} from "ai";
import { generateText, streamText, generateObject, streamObject } from "ai";
import { tool } from "ai";
import { gatherIterator } from "./utils/iterator.js";
import { Client } from "../index.js";
Expand Down Expand Up @@ -185,40 +178,6 @@ test("streamObject", async () => {
expect(storedRun.id).toEqual(traceId);
});

test("embed", async () => {
const traceId = uuid();
await embed({
model: openai.embedding("text-embedding-3-small"),
value: "prague castle at sunset",
experimental_telemetry: getTelemetrySettings(traceId),
});

await provider.forceFlush();
await waitUntilRunFound(client, traceId, true);

const storedRun = await client.readRun(traceId);
expect(storedRun.id).toEqual(traceId);
});

test("embedMany", async () => {
const traceId = uuid();
await embedMany({
model: openai.embedding("text-embedding-3-small"),
values: [
"a peaceful meadow with wildflowers",
"bustling city street at rush hour",
"prague castle at sunset",
],
experimental_telemetry: getTelemetrySettings(traceId),
});

await provider.forceFlush();
await waitUntilRunFound(client, traceId, true);

const storedRun = await client.readRun(traceId);
expect(storedRun.id).toEqual(traceId);
});

afterAll(async () => {
await provider.shutdown();
});

0 comments on commit d4a2af4

Please sign in to comment.