Skip to content

Conversation

imperorrp
Copy link
Contributor

PR Description

Added a test for PR #822 for parity with the VertexAI transport check test at https://github.com/imperorrp/langchain-google/blob/main/libs/vertexai/tests/integration_tests/test_chat_models.py#L788-L803

Relevant issues

#791

Type

✅ Test

Testing

image

model = ChatGoogleGenerativeAI(model=_MODEL, transport="rest")
assert model.client.transport.kind == "rest"

async def check_async_client():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why should this be async function?

Copy link
Contributor Author

@imperorrp imperorrp Apr 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

model.async_client does not appear to exist if ChatGoogleGenerativeAI is called outside of an async function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if this is added before the async function:

model = ChatGoogleGenerativeAI(model=_MODEL)
print(model.async_client)
print(model.client)
assert model.async_client.transport.kind == "grpc_asyncio"

then the test results look like this:
image

@mdrxy
Copy link
Collaborator

mdrxy commented Sep 15, 2025

@imperorrp sorry for delay but can you please resolve conflicts? Otherwise if this is solved can we close?

@mdrxy mdrxy changed the title genai: added test for ChatGoogleGenerativeAI class transport check test(genai): add test for ChatGoogleGenerativeAI class transport check Sep 17, 2025
@mdrxy mdrxy added the genai label Sep 17, 2025
@mdrxy mdrxy merged commit 152daeb into langchain-ai:main Sep 17, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants