Skip to content

Commit d4dd04a

Browse files
put llm analytics behind a flag
1 parent 1ef5f9f commit d4dd04a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/web/src/features/chat/actions.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -966,10 +966,13 @@ export const _getAISDKLanguageModelAndOptions = async (config: LanguageModel): P
966966

967967
const posthog = await createPostHogClient();
968968
const distinctId = await tryGetPostHogDistinctId();
969-
const model = withTracing(_model, posthog, {
970-
posthogDistinctId: distinctId,
971-
posthogPrivacyMode: env.SOURCEBOT_TELEMETRY_PII_COLLECTION_ENABLED !== 'true',
972-
});
969+
970+
// Only enable posthog LLM analytics for the ask GH experiment.
971+
const model = env.EXPERIMENT_ASK_GH_ENABLED === 'true' ?
972+
withTracing(_model, posthog, {
973+
posthogDistinctId: distinctId,
974+
}) :
975+
_model;
973976

974977
return {
975978
model,

0 commit comments

Comments
 (0)