Skip to content

Commit

Permalink
add missing extension from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson committed Dec 7, 2023
1 parent 5e18214 commit 98b7764
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions OpenAI-DotNet/Threads/ThreadExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,16 @@ public static async Task<ListResponse<RunResponse>> ListRunsAsync(this ThreadRes
public static async Task<RunResponse> UpdateAsync(this RunResponse run, CancellationToken cancellationToken = default)
=> await run.Client.ThreadsEndpoint.RetrieveRunAsync(run.ThreadId, run.Id, cancellationToken).ConfigureAwait(false);

/// <summary>
/// Retrieves a run.
/// </summary>
/// <param name="thread">The thread that was run.</param>
/// <param name="runId">The id of the run to retrieve.</param>
/// <param name="cancellationToken">Optional, <see cref="CancellationToken"/>.</param>
/// <returns><see cref="RunResponse"/>.</returns>
public static async Task<RunResponse> RetrieveRunAsync(this ThreadResponse thread, string runId, CancellationToken cancellationToken = default)
=> await thread.Client.ThreadsEndpoint.RetrieveRunAsync(thread.Id, runId, cancellationToken);

/// <summary>
/// Modifies a run.
/// </summary>
Expand Down

0 comments on commit 98b7764

Please sign in to comment.