mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-20 01:04:22 +01:00
add sse streaming to sdk
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
configured_endpoints: 41
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-d5200eaa145f567a58daa78941ab1141dd63f5f0cfe1596d5c9ecf12d34fea35.yml
|
||||
openapi_spec_hash: abeb66291dc158f2cdc90bf9945e283e
|
||||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-6d8e9dfd438cac63fc7d689ea29adfff81ff8880c2d8e1e10fc36f375a721594.yml
|
||||
openapi_spec_hash: 7ac6028dd5957c67a98d91e790863c80
|
||||
config_hash: fb625e876313a9f8f31532348fa91f59
|
||||
|
||||
@@ -41,6 +41,7 @@ func (r *EventService) ListStreaming(ctx context.Context, opts ...option.Request
|
||||
err error
|
||||
)
|
||||
opts = append(r.Options[:], opts...)
|
||||
opts = append([]option.RequestOption{option.WithHeader("Accept", "text/event-stream")}, opts...)
|
||||
path := "event"
|
||||
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &raw, opts...)
|
||||
return ssestream.NewStream[EventListResponse](ssestream.NewDecoder(raw), err)
|
||||
|
||||
Reference in New Issue
Block a user