Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Jupyternaut reply for API auth errors user-friendly (#513)
* Catch API auth errors * use generic api error text with llm id * use provider_name in auth error message * update err msg wording as per @JasonWeill * use function, not const for api_key_excs * remove redundancy * update pydoc * implement util classes for api key exc identif * Gracefully handle AI21 API key * Handle Anthropic APi error via AnthropicErrorUtility * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * correct pydoc * remove comment * log every error handled in handle_exc * Update packages/jupyter-ai/jupyter_ai/chat_handlers/base.py Co-authored-by: Jason Weill <[email protected]> * update handle_api_key_exc * adjsut utils * use util consistently in utility class names * move is_api_error method to providers, not utils * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * show open settings button on api err * Update packages/jupyter-ai/src/components/chat-messages.tsx Co-authored-by: Piyush Jain <[email protected]> * comments per @3coins * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * AgentChatMessage show_edit_settings field * show button state * remove additional .reply() arg, AgentMsg field, open stngs button * updates per @dlqqq comments * remove rebase artifacts --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jason Weill <[email protected]> Co-authored-by: Piyush Jain <[email protected]>
- Loading branch information