logspace-ai / langflow

⛓️ Langflow is a dynamic graph where each node is an executable unit. Its modular and interactive design fosters rapid experimentation and prototyping, pushing hard on the limits of creativity.
http://www.langflow.org
MIT License
15.28k stars 2.28k forks source link

Integrating VertexAI / Google LLMs #416

Closed mamigot closed 7 months ago

mamigot commented 10 months ago

Should integrate the VertexAI / Google Cloud Platform LLMs (already on LangChain) such as:

https://github.com/hwchase17/langchain/blob/master/langchain/llms/vertexai.py#L72

mamigot commented 10 months ago

https://github.com/logspace-ai/langflow/issues/419 will be relevant as well in order to close this issue

ogabrielluiz commented 10 months ago

I'll see if I can get my hands on it. I'm having trouble getting LangChain to recognize the credentials.

mamigot commented 10 months ago

Sounds good, and the credentials for which part? Happy to help

ogabrielluiz commented 10 months ago

I added the node, but running the gcloud set project ... didn't make the langchain class recognize the credentials for some reason.

TMRolle commented 9 months ago

I added the node, but running the gcloud set project ... didn't make the langchain class recognize the credentials for some reason.

I have noticed some issues with the langchain integration picking up ADC (specifically the default Project ID) which seem to be resolved by running aiplatform.init(project=PROJECT_ID_HERE). Maybe try that?

cachatj commented 9 months ago

wondering if/when we maybe able to expect any progress here in using GCP VertexAI LLM models and services within LangFlow, like we already can in LangChain?

TMRolle commented 9 months ago

I'm happy to assist from the Google side. I'm a backend troll and can't typescript to save my life, but I'm very familiar with our API platform/auth/etc and the python client libraries side of things. @ogabrielluiz or anyone else familiar with the frontend/langflow codebase side of the house, let me know if you want to set up a pair troubleshooting session to get that auth issue knocked out real quick (or just direct me to the relevant code, whatever's easiest)

ogabrielluiz commented 9 months ago

Hey @TMRolle. I've created a PR (#555) and added the Component to it. You should be able to drop it in the canvas and (try to) run it.

Should I set up a function to run google.auth before instantiating it?

stale[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.