Skip to content

Commit

Permalink
Enable experimental_telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
Rindrics committed Oct 21, 2024
1 parent 6139b23 commit c7e9e3f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export async function generateArtifactStream(
system: params.systemPrompt ?? "You generate an answer to a question. ",
prompt: params.userPrompt,
schema: artifactSchema,
experimental_telemetry: {
isEnabled: true,
},
onFinish: async (result) => {
const meter = metrics.getMeter("OpenAI");
const tokenCounter = meter.createCounter("token_consumed", {
Expand Down

0 comments on commit c7e9e3f

Please sign in to comment.