-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Custom 'apiVersion' and 'baseUrl' parameters not being respected #5482
Comments
Hello @caiorg! 🚀 I'm Dosu, a helpful bot here to assist you with bugs, answer your questions, and guide you on contributing while we wait for a human maintainer. I'm diving into your issue and will be back with a full answer shortly! 🤖 |
It appears there's a discrepancy between the
If these steps don't resolve the issue, consider debugging the library code directly to trace how the This approach should help identify the root cause of the issue and guide you towards a solution. If you need further assistance, feel free to ask.
|
I've already done all the steps mentioned prior to opening this issue. I've managed to get it worki FOR TESTING PURPOSES by altering the library code at lines and file as I mentioned earlier. |
Fixed by #5490 (upgrade to v0.0.15) |
Checked other resources
Example Code
The following code from langchain-nextjs-template, updated to use Google's Gemini 1.5 Pro does not work as intended when "querying" the model and waiting for a response.
FILE:
langchain-nextjs-template/app/api/chat/route.ts
Error Message and Stack Trace (if applicable)
After timining out, I'm presented a toaster with the contents of the following api error response:
Description
I'm trying to use
apiVersion
andbaseUrl
parameters to update the url, but those are not taken into account when bootstraping the client. This behaviour can be verified by using simpleconsole.log("this", this)
before and after initializingthis.client
variable.As per seen at lines 280 and 281 from
@langchain/google-genai
lib (not shure if other libs have the same issue):langchainjs/libs/langchain-google-genai/src/chat_models.ts
Line 280 in 14e697f
and
langchainjs/libs/langchain-google-genai/src/chat_models.ts
Line 281 in 14e697f
It looks like it would need to follow the same approach at line 242 from the same file:
langchainjs/libs/langchain-google-genai/src/chat_models.ts
Line 242 in 14e697f
System Info
BTW... tried using the latest stable version too.
EDIT 1:
Forgot to mention that when testing, I was using a real Google API Key, but ommited here changing it to
MY_API_KEY
.The text was updated successfully, but these errors were encountered: