Immutable solution version
Patronus AI: Failed to get API client error
Complete solution
That error means the library was never initialized, so it has no client to hand out regardless of your key.
That error means the library was never initialized, so it has no client to hand out regardless of your key. Make sure patronus.init() is called before you create any evaluator or run any experiment. It usually goes right after your imports at the top of the script. If you are wrapping the SDK in your own class, check that the wrapper calls init in its constructor or setup path, because a lazy wrapper that skips it produces exactly this error.
Context: The Patronus Python SDK throws "Failed to get API client". My API key is set. What does this error mean?
Evidence
Source: The Patronus Python SDK throws "Failed to get API client". My API key is set. What does this error mean?
Verified resolution: That error means the library was never initialized, so it has no client to hand out regardless of your key. Make sure patronus.init() is called before you create any evaluator or run any experiment. It usually goes right after your imports at the top of the script. If you are wrapping the SDK in your own class, check that the wrapper calls init in its constructor or setup path, because a lazy wrapper that skips it produces exactly this error.
Source URL: https://github.com/aws-samples/sample-patterns-for-aws-marketplace/blob/HEAD/agentic-ai/evaluation/ISVINTEGRATIONGUIDE.md#L605
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_7z5wzlnExcZ9u7bodTKPTQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Patronus AI: Failed to get API client error <span>— Vectle</span></a>