(input: {
readonly url: string
readonly token: Redacted.Redacted<string>
readonly tokenHeader?: string
readonly model: string
readonly headers?: Record<string, string>
})
| 376 | ) |
| 377 | |
| 378 | const validateChat = (input: { |
| 379 | readonly url: string |
| 380 | readonly token: Redacted.Redacted<string> |
| 381 | readonly tokenHeader?: string |
| 382 | readonly model: string |
| 383 | readonly headers?: Record<string, string> |
| 384 | }) => |
| 385 | ProviderShared.jsonPost({ |
| 386 | url: input.url, |
| 387 | headers: { ...input.headers, [input.tokenHeader ?? "authorization"]: `Bearer ${Redacted.value(input.token)}` }, |
| 388 | body: ProviderShared.encodeJson({ |
| 389 | model: input.model, |
| 390 | messages: [{ role: "user", content: "Reply with exactly: ok" }], |
| 391 | max_tokens: 3, |
| 392 | temperature: 0, |
| 393 | }), |
| 394 | }).pipe(executeRequest) |
| 395 | |
| 396 | const validateBedrock = (env: Env) => |
| 397 | Effect.gen(function* () { |
no outgoing calls
no test coverage detected