-
Notifications
You must be signed in to change notification settings - Fork 185
Set userId in langfuse trace if "user" is passed in OpenAI completion API calls #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@code-haven thanks for the contribution. I am happy to push this out asap. Do you mind renaming |
@maxdeichmann done |
observations do not have user ids
oops, looks like the OpenAI library isn't liking the user_id parameter. Have to test if this work again. |
Ok. Is it ok to have it the way it is now? Having the userId on the generation function might be confusing for users. |
are you suggesting to create a custom trace with userId and passing trace_id to the chatCompletion call instead of making this change (if we leave this as it is now)? |
Yes, i think this would be the cleanest solution for now. |
ok, sounds good. thanks for the help! |
Use the "user" parameter in https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids to be able to group usage by user in https://langfuse.com/docs/user-explorer.