You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| \`$ai_output_choices\` | List of response choices from the LLM |
214
214
| \`$ai_output_tokens\` | The number of tokens in the output (often found in \`response.usage\`) |
215
215
| \`$ai_total_cost_usd\` | The total cost in USD (input + output) |
216
-
| [[...]](/docs/llm-analytics/generations#event-properties) | See [full list](/docs/llm-analytics/generations#event-properties) of properties|
216
+
| [[...]](https://posthog.com/docs/llm-analytics/generations#event-properties) | See [full list](https://posthog.com/docs/llm-analytics/generations#event-properties) of properties|
These SDKs **do not** proxy your calls. They only fire off an async call to PostHog in the background to send the data.
73
73
74
-
You can also use LLM analytics with other SDKs or our API, but you will need to capture the data in the right format. See the schema in the [manual capture section](/docs/llm-analytics/installation/manual-capture) for more details.
74
+
You can also use LLM analytics with other SDKs or our API, but you will need to capture the data in the right format. See the schema in the [manual capture section](https://posthog.com/docs/llm-analytics/installation/manual-capture) for more details.
**Note:** If you want to capture LLM events anonymously, **don't** pass a distinct ID to the request. See our docs on [anonymous vs identified events](/docs/data/anonymous-vs-identified-events) to learn more.
252
+
**Note:** If you want to capture LLM events anonymously, **don't** pass a distinct ID to the request. See our docs on [anonymous vs identified events](https://posthog.com/docs/data/anonymous-vs-identified-events) to learn more.
| \`$ai_output_choices\` | List of response choices from the LLM |
275
275
| \`$ai_output_tokens\` | The number of tokens in the output (often found in \`response.usage\`) |
276
276
| \`$ai_total_cost_usd\` | The total cost in USD (input + output) |
277
-
| [[...]](/docs/llm-analytics/generations#event-properties) | See [full list](/docs/llm-analytics/generations#event-properties) of properties|
277
+
| [[...]](https://posthog.com/docs/llm-analytics/generations#event-properties) | See [full list](https://posthog.com/docs/llm-analytics/generations#event-properties) of properties|
These SDKs **do not** proxy your calls. They only fire off an async call to PostHog in the background to send the data.
73
73
74
-
You can also use LLM analytics with other SDKs or our API, but you will need to capture the data in the right format. See the schema in the [manual capture section](/docs/llm-analytics/installation/manual-capture) for more details.
74
+
You can also use LLM analytics with other SDKs or our API, but you will need to capture the data in the right format. See the schema in the [manual capture section](https://posthog.com/docs/llm-analytics/installation/manual-capture) for more details.
Initialize PostHog with your project API key and host from [your project settings](https://app.posthog.com/settings/project), then pass it to the LangChain `CallbackHandler` wrapper.
82
82
83
-
Optionally, you can provide a user distinct ID, trace ID, PostHog properties, [groups](/docs/product-analytics/group-analytics), and privacy mode.
83
+
Optionally, you can provide a user distinct ID, trace ID, PostHog properties, [groups](https://posthog.com/docs/product-analytics/group-analytics), and privacy mode.
**Note:** If you want to capture LLM events anonymously, **don't** pass a distinct ID to the `CallbackHandler`. See our docs on [anonymous vs identified events](/docs/data/anonymous-vs-identified-events) to learn more.
142
+
**Note:** If you want to capture LLM events anonymously, **don't** pass a distinct ID to the `CallbackHandler`. See our docs on [anonymous vs identified events](https://posthog.com/docs/data/anonymous-vs-identified-events) to learn more.
| \`$ai_output_choices\` | List of response choices from the LLM |
220
220
| \`$ai_output_tokens\` | The number of tokens in the output (often found in \`response.usage\`) |
221
221
| \`$ai_total_cost_usd\` | The total cost in USD (input + output) |
222
-
| [[...]](/docs/llm-analytics/generations#event-properties) | See [full list](/docs/llm-analytics/generations#event-properties) of properties|
222
+
| [[...]](https://posthog.com/docs/llm-analytics/generations#event-properties) | See [full list](https://posthog.com/docs/llm-analytics/generations#event-properties) of properties|
| \`$ai_output_choices\` | List of response choices from the LLM |
175
175
| \`$ai_output_tokens\` | The number of tokens in the output (often found in \`response.usage\`) |
176
176
| \`$ai_total_cost_usd\` | The total cost in USD (input + output) |
177
-
| [[...]](/docs/llm-analytics/generations#event-properties) | See [full list](/docs/llm-analytics/generations#event-properties) of properties|
177
+
| [[...]](https://posthog.com/docs/llm-analytics/generations#event-properties) | See [full list](https://posthog.com/docs/llm-analytics/generations#event-properties) of properties|
| \`$ai_output_choices\` | List of response choices from the LLM |
199
199
| \`$ai_output_tokens\` | The number of tokens in the output (often found in \`response.usage\`) |
200
200
| \`$ai_total_cost_usd\` | The total cost in USD (input + output) |
201
-
| [[...]](/docs/llm-analytics/generations#event-properties) | See [full list](/docs/llm-analytics/generations#event-properties) of properties |
201
+
| [[...]](https://posthog.com/docs/llm-analytics/generations#event-properties) | See [full list](https://posthog.com/docs/llm-analytics/generations#event-properties) of properties |
| \`$ai_output_choices\` | List of response choices from the LLM |
209
209
| \`$ai_output_tokens\` | The number of tokens in the output (often found in \`response.usage\`) |
210
210
| \`$ai_total_cost_usd\` | The total cost in USD (input + output) |
211
-
| [[...]](/docs/llm-analytics/generations#event-properties) | See [full list](/docs/llm-analytics/generations#event-properties) of properties|
211
+
| [[...]](https://posthog.com/docs/llm-analytics/generations#event-properties) | See [full list](https://posthog.com/docs/llm-analytics/generations#event-properties) of properties|
These SDKs **do not** proxy your calls. They only fire off an async call to PostHog in the background to send the data.
49
49
50
-
You can also use LLM analytics with other SDKs or our API, but you will need to capture the data in the right format. See the schema in the [manual capture section](/docs/llm-analytics/installation/manual-capture) for more details.
50
+
You can also use LLM analytics with other SDKs or our API, but you will need to capture the data in the right format. See the schema in the [manual capture section](https://posthog.com/docs/llm-analytics/installation/manual-capture) for more details.
**Note:** If you want to capture LLM events anonymously, **don't** pass a distinct ID to the request. See our docs on [anonymous vs identified events](/docs/data/anonymous-vs-identified-events) to learn more.
116
+
**Note:** If you want to capture LLM events anonymously, **don't** pass a distinct ID to the request. See our docs on [anonymous vs identified events](https://posthog.com/docs/data/anonymous-vs-identified-events) to learn more.
| \`$ai_output_choices\` | List of response choices from the LLM |
139
139
| \`$ai_output_tokens\` | The number of tokens in the output (often found in \`response.usage\`) |
140
140
| \`$ai_total_cost_usd\` | The total cost in USD (input + output) |
141
-
| [[...]](/docs/llm-analytics/generations#event-properties) | See [full list](/docs/llm-analytics/generations#event-properties) of properties|
141
+
| [[...]](https://posthog.com/docs/llm-analytics/generations#event-properties) | See [full list](https://posthog.com/docs/llm-analytics/generations#event-properties) of properties|
0 commit comments