Skip to content

Commit

Permalink
feat: Updated OpenAPI spec (#81)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <[email protected]>
  • Loading branch information
HavenDV and github-actions[bot] authored Nov 14, 2024
1 parent 363e1d5 commit 50393ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,10 @@ partial void ProcessCreateMessageResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Anthropic.Message.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Anthropic.Message.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,10 @@ partial void ProcessCreateMessageBatchResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Anthropic.MessageBatch.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Anthropic.MessageBatch.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,10 @@ partial void ProcessRetrieveMessageBatchResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::Anthropic.MessageBatch.FromJsonStreamAsync(__responseStream, JsonSerializerContext).ConfigureAwait(false);
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::Anthropic.MessageBatch.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down

0 comments on commit 50393ce

Please sign in to comment.