Closed
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
I specified the limit parameter, but the message history does not match the limit parameter value.
https://github.com/openai/openai-python/blob/main/src/openai/types/beta/threads/message_list_params.py#L29-L30
limit: int
"""A limit on the number of objects to be returned.
it is forum feedback url.
https://community.openai.com/t/request-make-it-possible-to-specify-the-upper-limit-of-history/663420
To Reproduce
always
Code snippets
def _get_message(gpt_thread_id:str, secret:str):
client = OpenAI(api_key=secret)
return client.beta.threads.messages.list(
thread_id=gpt_thread_id,
extra_query = {"limit": 1},
limit=1
)
### OS
mac(docker debian)
### Python version
python3.9
### Library version
opneai v1.12.0