Open HAL9KKK opened 9 hours ago
The issue you're experiencing seems to be related to the pipeline not correctly categorizing conversational inputs, specifically when it should skip steps for general greetings like "How are you?".
In the PandasAI pipeline, steps like PromptGeneration
and CodeGenerator
are typically skipped if the response is found in the cache, as determined by the is_cached
method [1]. However, it seems that the pipeline is not correctly identifying "How are you?" as a conversational input that should be skipped.
To address this, you might want to check the logic that determines when to skip these steps for conversational inputs. Ensure that the configuration or logic responsible for identifying and categorizing conversational inputs is correctly implemented. This might involve reviewing how the conversational
parameter is being used in your setup, as its expected behavior is not clearly documented in the available information.
If the issue persists, consider reviewing the implementation of the SemanticChatPipeline
and related components like SemanticResultParser
, which are responsible for parsing and categorizing conversational inputs [2][3]. Adjustments in these areas might help in correctly categorizing and skipping steps for conversational inputs.
To continue talking to Dosu, mention @dosu.
System Info
OS version: windows 10 Python version: 3.12.7 The current version of pandasai being used: 2.3.0
🐛 Describe the bug
It seems the pipeline is not able to categorize correctly the conversation:
Here the config code for the Agent:
config = {"llm":llm,"verbose": True, "direct_sql": False,"enable_cache": True,"response_parser": StreamlitResponse2, 'conversational':True}
Here the pipepline log, where in the first attempt with "Hello" it is ok, then with "How are you?" it is trying to create the code...missing the skipping:
result = {'type': 'string', 'value': 'Hello! How can I assist you today?'} print(result)