Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

code-haven
Copy link

@code-haven code-haven commented Nov 13, 2023

@code-haven code-haven changed the title Set user_id in langfuse trace if user variable is passed in OpenAI completion API calls Set userId in langfuse trace if "user" is passed in OpenAI completion API calls Nov 13, 2023
@maxdeichmann
Copy link
Member

@code-haven thanks for the contribution. I am happy to push this out asap. Do you mind renaming user to user_id? Some of our users might insert an object to user which would not work. With user_id we have higher likelihood of getting strings :)

@code-haven code-haven marked this pull request as ready for review November 13, 2023 11:30
@code-haven
Copy link
Author

@maxdeichmann done

@code-haven
Copy link
Author

oops, looks like the OpenAI library isn't liking the user_id parameter. Have to test if this work again.

@maxdeichmann
Copy link
Member

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.

@code-haven
Copy link
Author

code-haven commented Nov 13, 2023

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)?

@maxdeichmann
Copy link
Member

eate 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.

@code-haven
Copy link
Author

ok, sounds good. thanks for the help!

@code-haven code-haven closed this Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants