You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there, @adithep! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!
The "UnauthorizedError: status_code: 401, body: {'message': 'invalid api token'}" occurs when trying to chat with a brain with a document because the authorization process involves validating the user's access to the specific brain using the validate_brain_authorization function. This function checks if the user has the required roles (Viewer, Editor, Owner) for the brain. If the API token is invalid or the user does not have the necessary permissions, the authorization fails, resulting in a 401 error.
In contrast, when chatting directly with the model, this specific authorization step related to the brain is bypassed, allowing the interaction to proceed without triggering the error [1].
What happened?
Once trying to chat with newly create brain got:
UnauthorizedError: status_code: 401, body: {'message': 'invalid api token'}
This bug only happens when trying to chat with a brain with document.
Chatting directly with the model is fine. So, likely not a problem with open ai api key?
Relevant log output
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: