langflow-ai / langflow

⛓️ Langflow is a visual framework for building multi-agent and RAG applications. It's open-source, Python-powered, fully customizable, model and vector store agnostic.
http://www.langflow.org
MIT License
18.95k stars 2.87k forks source link

Error Building Component: Error building vertex OpenAI Embeddings: OpenAIEmbeddingsComponent.build() missing 1 required positional argument: 'openai_api_key' #1690

Open ALee008 opened 2 months ago

ALee008 commented 2 months ago

Describe the bug First time using datastax. I used this tutorial and created a "Vector Store RAG". I configured the Astra Tokens and API and created an OpenAI API Key. I followed the tutorial an pressed the "play" button. But I am getting the following error:

Error Building Component
- Error building vertex OpenAI Embeddings: OpenAIEmbeddingsComponent.build() missing 1 required positional argument: 'openai_api_key'

I went even as far as placing the OpenAI API Key in all components of the workflow - though this was not mentioned in the tutorial.

Browser and Version

To Reproduce Steps to reproduce the behavior:

  1. Go to 'New Project'
  2. Click on 'Vector Store RAG'
  3. Scroll down to the simple flow 'Ingestion Flow' (as suggested in the tutorial)
  4. Provide valid Astra Token and Endpoint
  5. Provide valid OpenAI_API_KEY
  6. Click on "play" button in Astra DB component (as suggested in the tutorial)
  7. Get message "Flow finisched successfully" and an error.

Screenshots

image image
craigjurs commented 2 months ago

Hello, I have the same issue. image

craigjurs commented 2 months ago

alright the problem is in the Build class

image

this works, which is a hint

image

ogabrielluiz commented 1 month ago

Hey all

Are you using the HuggingFace Space when trying this? We remove all API keys there by default.

sho5akimoto commented 1 month ago

Hi All, I also had the same issue at my duplicated HuggingFace Space env, and it looks like this issue is dupulicate of #1497 I succeeded to create and run the Project based from "Vector Store RAG". Hope it will help you all.

  1. Go to [Settings] page
  2. Click [View] of 'LANGFLOW_REMOVE_API_KEYS' variable
  3. Update the value from 'true' to 'false'
  4. (I created 'OPENAI_API_KEY' variable, but maybe it's option)
  5. Click [Factory rebuild] *Not sure it's necessary step. I wanted to run LangFlow with the updated 'LANGFLOW_REMOVE_API_KEYS' variable
  6. Create the Project and try to do with the same steps which specified at https://pre-release.langflow.org/starter-projects/vector-store-rag