Closed alejandroacho closed 1 month ago
Hey @alejandroacho! I'm here to help you with any bugs, questions, or contributions. Let's tackle this together!
The error message you're encountering indicates that the AstraDB component is not receiving the collection_name
parameter correctly. Here are a few things to check and try:
Component ID: Ensure that the AstraDB-COMPONENT-ID
in your payload matches the actual component ID used in your flow. The component ID should be the exact identifier assigned to the AstraDB component in your Langflow setup.
Payload Structure: Verify that the payload structure is correct. It should be a dictionary where the key is the component ID and the value is another dictionary containing the parameters you want to tweak. For example:
{
"AstraDB-COMPONENT-ID": {
"collection_name": "your_collection_name"
}
}
API Endpoint: Double-check that the api_url
is correctly pointing to the Langflow API endpoint for running the flow.
Langflow Version: Ensure that you are using the correct version of Langflow (1.0.18) and that there are no known issues with this version related to the AstraDB component. If there are any updates or patches available, consider applying them.
If these steps do not resolve the issue, it might be helpful to review the logs for any additional error messages or details that could provide more insight into why the collection_name
is not being set. Langflow uses the loguru
logger, which can help trace the initialization process of the AstraDB component [1].
To continue talking to Dosu, mention @dosu.
Hi @alejandroacho
Happy to help! Could you please share the details of the flow as well as the complete payload (excluding any sensitive information)? This would allow me to debug the issue more effectively.
Looking forward to your response!
Solved. I had to put the tweaks dict in a tweak json attribute:
payload = {
"input_value": message,
"tweaks": {
"TextInput-ID": {"input_value": "Hello world"},
},
}
headers = {"Content-Type": "application/json"}
response = requests.post(f"{LANGFLOW_API_URL}/api/v1/run/{ENDPOINT}", json=payload, headers=headers)
Bug Description
When I pass the collection name through tweaks, it doesn't change it.
Reproduction
response.json() = {'detail': '{"message":"Error running graph: Error building Component Astra DB: \\n\\nError initializing AstraDBVectorStore: Must provide a collection name","traceback":null,"description":null,"code":null,"suggestion":null}'}
Expected behavior
AstraDB component should get collection_name tweak in order to initialize
Who can help?
No response
Operating System
Mac OS Sequoia 15.0 (using docker image)
Langflow Version
1.0.18
Python Version
None
Screenshot
Flow File
No response