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
Document public APIs and make `GroupCollection.TryAdd(Group)` store entries by group type instead of group key, matching the collection's one-group-per-type behavior.
Copy file name to clipboardExpand all lines: src/PostHog.AI/PostHogAIExtensions.cs
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -33,12 +33,14 @@ public static IHttpClientBuilder AddPostHogOpenAIHandler(this IHttpClientBuilder
33
33
34
34
/// <summary>
35
35
/// Adds an <see cref="OpenAIClient"/> that intercepts requests and sends events to PostHog.
36
-
/// Note: This will override the <see cref="OpenAIClientOptions.Transport"/> property to use the PostHog handler.
36
+
/// Note: This sets the <c>OpenAIClientOptions.Transport</c> property to use the PostHog handler and throws if a custom transport is already configured.
/// <param name="apiKey">The OpenAI API key.</param>
40
40
/// <param name="configureOptions">Optional action to configure <see cref="OpenAIClientOptions"/>.</param>
41
41
/// <returns>The <see cref="IHttpClientBuilder"/> for the underlying HttpClient, allowing further customization (e.g. resilience).</returns>
42
+
/// <exception cref="ArgumentException">Thrown when <paramref name="apiKey"/> is null, empty, or whitespace.</exception>
43
+
/// <exception cref="InvalidOperationException">Thrown when PostHog services are not registered or when <paramref name="configureOptions"/> sets a custom transport.</exception>
0 commit comments