Using GetMessages with the "AfterId" parameter of MessageCollectionOptions... how does this work? #763
                  
                    
                      OracleCura
                    
                  
                
                  started this conversation in
                General
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Help me out here, I'm trying to figure this out.
I have an instance of the AssistantClient class, and I call GetMessages. If I pass in the thread Id, I get all the messages. Great.
What if I already have all of the messages except the latest one? Well I can pass an instance of MessageCollectionOptions in there too, and AfterId seems like it might be there for this scenario, but... it doesn't seem to work the way I expect. If I provide the Id of the latest message I've received, or even the Id of the latest message I've sent, I always get the same thing: All of the messages... except the latest response from the assistant. I don't get it.
Basically if I want to reliably get the latest response from the assistant, I have to fetch all of the messages? That can't be right, can it?
How is this supposed to work? Does this not work as I'm expecting it to, at all? I can't find any documentation to explain this anywhere. If there is such documentation, please let me know where I can find it.
Beta Was this translation helpful? Give feedback.
All reactions