-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed as not planned
Closed as not planned
Copy link
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
When passing a custom user value to openai.ChatCompletion.create(), the request completes successfully, but there is no indication that the value is being acknowledged, logged, or used in any visible monitoring system. The documentation states that the user field is used for abuse monitoring, but from the client perspective, it is impossible to confirm whether this information is being handled or ignored.
This makes it difficult to audit usage or confirm compliance with OpenAI’s best practices.
To Reproduce
- Use the latest version of openai Python package.
- Run the code:
import openai
openai.api_key = "your-key-here"
response = openai.ChatCompletion.create(
model="gpt-4",
messages=[{"role": "user", "content": "Hello"}],
user="my_test_user_001"
)
print(response)- Observe that the request works, but there is no way to verify the user field was registered or tracked.
Code snippets
import openai
openai.api_key = "api_key"
response = openai.ChatCompletion.create(
model="gpt-4",
messages=[
{"role": "user", "content": "Hello!"}
],
user="test_user_123"
)
print(response)
#This snippet Demonstrates correct usage of the user parameter and shows the lack of any visible effect or confirmation that the user ID was acknowledged in the response.OS
macOS
Python version
Python v3.11.3
Library version
openai v1.30.1
Metadata
Metadata
Assignees
Labels
No labels