-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YandexGPT client returns an error when invoked #25575
Comments
may #25617 fix it? |
@nktpv thanks for confirming. |
I believe your solution is the best possible one, because to make the grpc_metadata field visible to subclasses, you can only either remove the protected access modifier or directly assign a value to the field through cls. Since the second option isn’t great, I think we can stay with your approach to solving the problem. |
Checked other resources
Example Code
raises an error:
Error Message and Stack Trace (if applicable)
Description
I’m trying to use the langchain library to invoke a YandexGPT model. I expected to see a successful response from the model. Instead, I receive an StatusCode.UNAUTHENTICATED error with the message.
Previously, I encountered a similar issue where the error was AttributeError: 'YandexGPT' object has no attribute '_grpc_metadata'. I resolved this by modifying the _BaseYandexGPT class to make _grpc_metadata accessible in child classes, which fixed the issue. However, recent changes to the repository reverted my fix by reintroducing the _grpc_metadata parameter as protected and setting its default value to None.
This change has led to the current issue, where the authentication details are not being passed correctly, resulting in the StatusCode.UNAUTHENTICATED error. The original fix, which made _grpc_metadata accessible, resolved the issue and allowed the code to work as expected. Reverting these changes has introduced a new error without solving the original problem.
System Info
The text was updated successfully, but these errors were encountered: