(
options: typeof Generated.CreateResponse.Encoded
)
| 164 | } |
| 165 | |
| 166 | const createResponse = ( |
| 167 | options: typeof Generated.CreateResponse.Encoded |
| 168 | ): Effect.Effect<Generated.Response, AiError.AiError> => |
| 169 | client.createResponse(options).pipe( |
| 170 | Effect.catchTags({ |
| 171 | RequestError: (error) => |
| 172 | AiError.HttpRequestError.fromRequestError({ |
| 173 | module: "OpenAiClient", |
| 174 | method: "createResponse", |
| 175 | error |
| 176 | }), |
| 177 | ResponseError: (error) => |
| 178 | AiError.HttpResponseError.fromResponseError({ |
| 179 | module: "OpenAiClient", |
| 180 | method: "createResponse", |
| 181 | error |
| 182 | }), |
| 183 | ParseError: (error) => |
| 184 | AiError.MalformedOutput.fromParseError({ |
| 185 | module: "OpenAiClient", |
| 186 | method: "createResponse", |
| 187 | error |
| 188 | }) |
| 189 | }) |
| 190 | ) |
| 191 | |
| 192 | const createResponseStream = ( |
| 193 | options: Omit<typeof Generated.CreateResponse.Encoded, "stream"> |
nothing calls this directly
no test coverage detected