OpenAICompatibleSseResponse
Namespace: Vercel.AI.OpenAICompatible
public sealed class OpenAICompatibleSseResponse : IDisposableAn open SSE response. The caller disposes it.
Inheritance: object
Implements: IDisposable
Constructors
Section titled “Constructors”OpenAICompatibleSseResponse(HttpResponseMessage)
Section titled “OpenAICompatibleSseResponse(HttpResponseMessage)”public OpenAICompatibleSseResponse(HttpResponseMessage response)Creates a response wrapper.
Parameters
| Name | Type | Description |
|---|---|---|
response |
HttpResponseMessage |
Properties
Section titled “Properties”Headers
Section titled “Headers”public IReadOnlyDictionary<string, string> Headers { get; }Response headers.
Value: IReadOnlyDictionary<string, string>
Methods
Section titled “Methods”Dispose()
Section titled “Dispose()”public void Dispose()Disposes the HTTP response.
ReadAsync(CancellationToken)
Section titled “ReadAsync(CancellationToken)”public IAsyncEnumerable<string> ReadAsync(CancellationToken cancellationToken = default)Reads SSE data payloads until [DONE].
Parameters
| Name | Type | Description |
|---|---|---|
cancellationToken |
CancellationToken |
Returns: IAsyncEnumerable<string>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product