2.3.0 • Published 6 months ago

@arizeai/openinference-instrumentation-openai v2.3.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

OpenInference Instrumentation for OpenAI Node.js SDK

npm version

This module provides automatic instrumentation for the OpenAI Node.js SDK. which may be used in conjunction with @opentelemetry/sdk-trace-node.

Installation

npm install --save @arizeai/openinference-instrumentation-openai

Usage

To load the OpenAI instrumentation, specify it in the registerInstrumentations call along with any additional instrumentation you wish to enable.

const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");
const {
  OpenAIInstrumentation,
} = require("@arizeai/openinference-instrumentation-openai");
const { registerInstrumentations } = require("@opentelemetry/instrumentation");

const provider = new NodeTracerProvider();
provider.register();

registerInstrumentations({
  instrumentations: [new OpenAIInstrumentation()],
});

Examples

To run an example, run the following commands:

cd js/packages/openinference-instrumentation-openai
pnpm install
pnpm -r build
npx -y tsx examples/chat.ts # or responses.ts, embed.ts, etc

For more information on OpenTelemetry Node.js SDK, see the OpenTelemetry Node.js SDK documentation.

1.1.1

11 months ago

1.1.0

11 months ago

1.1.2

11 months ago

2.3.0

6 months ago

2.0.3

7 months ago

2.2.0

7 months ago

2.0.2

7 months ago

2.1.0

7 months ago

2.0.1

7 months ago

2.0.0

10 months ago

1.0.0

12 months ago

0.6.0

12 months ago

0.5.0

1 year ago

0.3.0

1 year ago

0.4.1

1 year ago

0.3.2

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.2.0

1 year ago

0.1.4

1 year ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.1-rc10

2 years ago

0.0.2

2 years ago

0.0.1-rc9

2 years ago

0.0.1-rc8

2 years ago

0.0.1-rc7

2 years ago

0.0.1-rc6

2 years ago

0.0.1-rc5

2 years ago

0.0.1-rc4

2 years ago

0.0.1-rc3

2 years ago

0.0.1-rc2

2 years ago

0.0.1-rc1

2 years ago