The reply of `fallback_response()`.
(text: str = "Hi!")
| 348 | |
| 349 | |
| 350 | def fallback_reply(text: str = "Hi!") -> BetaMessageParam: |
| 351 | """The reply of `fallback_response()`.""" |
| 352 | return { |
| 353 | "role": "assistant", |
| 354 | "content": [ |
| 355 | { |
| 356 | "type": "fallback", |
| 357 | "from": {"model": MODEL}, |
| 358 | "to": {"model": FALLBACK_MODEL}, |
| 359 | "trigger": {"type": "refusal", "category": "cyber"}, |
| 360 | }, |
| 361 | {"type": "text", "text": text}, |
| 362 | ], |
| 363 | } |
| 364 | |
| 365 | |
| 366 | def fallback_response(id: str) -> httpx2.Response: |