MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / fallback_reply

Function fallback_reply

tests/lib/threads/helpers.py:350–363  ·  view source on GitHub ↗

The reply of `fallback_response()`.

(text: str = "Hi!")

Source from the content-addressed store, hash-verified

348
349
350def 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
366def fallback_response(id: str) -> httpx2.Response:

Calls

no outgoing calls