MCPcopy Index your code
hub / github.com/Effect-TS/effect / createResponseStream

Function createResponseStream

packages/ai/openai/src/OpenAiClient.ts:192–201  ·  view source on GitHub ↗
(
      options: Omit<typeof Generated.CreateResponse.Encoded, "stream">
    )

Source from the content-addressed store, hash-verified

190 )
191
192 const createResponseStream = (
193 options: Omit<typeof Generated.CreateResponse.Encoded, "stream">
194 ): Stream.Stream<ResponseStreamEvent, AiError.AiError> => {
195 const request = HttpClientRequest.post("/responses", {
196 body: HttpBody.unsafeJson({ ...options, stream: true })
197 })
198 return streamRequest(request, ResponseStreamEvent).pipe(
199 Stream.takeUntil((event) => event.type === "response.completed" || event.type === "response.incomplete")
200 )
201 }
202
203 const createEmbedding = (
204 options: typeof Generated.CreateEmbeddingRequest.Encoded

Callers

nothing calls this directly

Calls 2

streamRequestFunction · 0.70
pipeMethod · 0.65

Tested by

no test coverage detected