-
Notifications
You must be signed in to change notification settings - Fork 288
Open
Labels
issue-addressedWorkflow: The OpenAI maintainers believe the issue to be addressed and ready to close.Workflow: The OpenAI maintainers believe the issue to be addressed and ready to close.questionCategory: The issue is seeking information about the library or its usage.Category: The issue is seeking information about the library or its usage.
Description
Describe the bug
The PageSizeLimit parameter does not work with the GetMessages() and GetMessagesAsync() methods in the instantiated assistantClient class. No matter how I set the parameter, the response always contains the maximum number of messages.
I tested the endpoint provided by OpenAI (GET https://api.openai.com/v1/threads/{thread_id}/messages) via Postman using the same parameter, and it worked as expected there. This leads me to believe that the issue is not with the endpoint itself, but likely with the library implementation.
Steps to reproduce
Just call the affected methods to reproduce the bug:
Code snippets
MessageCollectionOptions options = new()
{
Order = order is not null ? order : MessageCollectionOrder.Ascending
};
if (limit.HasValue && limit > 0 && limit <= 100)
{
options.PageSizeLimit = limit.Value;
}
List<ThreadMessage> result = assistantClient.GetMessages(threadId, options).ToList();
OS
Linux Mint
.NET version
9.0.300
Library version
2.2.0
Metadata
Metadata
Assignees
Labels
issue-addressedWorkflow: The OpenAI maintainers believe the issue to be addressed and ready to close.Workflow: The OpenAI maintainers believe the issue to be addressed and ready to close.questionCategory: The issue is seeking information about the library or its usage.Category: The issue is seeking information about the library or its usage.