run_id string Optional (#855)
Filter messages by the run ID that generated them. Co-authored-by: wappi <support@wappi.pro>
This commit is contained in:
@@ -100,6 +100,7 @@ func (c *Client) ListMessage(ctx context.Context, threadID string,
|
||||
order *string,
|
||||
after *string,
|
||||
before *string,
|
||||
runID *string,
|
||||
) (messages MessagesList, err error) {
|
||||
urlValues := url.Values{}
|
||||
if limit != nil {
|
||||
@@ -114,6 +115,10 @@ func (c *Client) ListMessage(ctx context.Context, threadID string,
|
||||
if before != nil {
|
||||
urlValues.Add("before", *before)
|
||||
}
|
||||
if runID != nil {
|
||||
urlValues.Add("run_id", *runID)
|
||||
}
|
||||
|
||||
encodedValues := ""
|
||||
if len(urlValues) > 0 {
|
||||
encodedValues = "?" + urlValues.Encode()
|
||||
|
||||
Reference in New Issue
Block a user