-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
conversational failed #1405
Comments
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 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 If the issue persists, consider reviewing the implementation of the |
in the second question "how are you?" the pipeline try to generate code and executu and of course it fails. What is the pipeline logic that supposed to understand that this is only a convestation rather than a riquest to perfome some analysis of the data? |
The PandasAI pipeline uses caching to determine when to skip certain steps like To address the issue where the pipeline incorrectly attempts to generate code for a conversational input like "How are you?", you should review the configuration and logic that categorizes inputs. This might involve checking how the |
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)
```
2024-10-21 19:03:01 [INFO] Executing Step 6: CodeExecution
2024-10-21 19:03:01 [INFO] Executing Step 7: ResultValidation
2024-10-21 19:03:01 [INFO] Answer: {'type': 'string', 'value': 'Hello! How can I assist you today?'}
2024-10-21 19:03:01 [INFO] Executing Step 8: ResultParsing
2024-10-21 19:03:07 [INFO] Question: how are you?
2024-10-21 19:03:07 [INFO] Running PandasAI with azure-openai LLM...
2024-10-21 19:03:07 [INFO] Prompt ID: 03e3f142-d68f-48b7-9475-f7e163e49234
2024-10-21 19:03:07 [INFO] Executing Pipeline: GenerateChatPipeline
2024-10-21 19:03:07 [INFO] Executing Step 0: ValidatePipelineInput
2024-10-21 19:03:07 [INFO] Executing Step 1: CacheLookup
2024-10-21 19:03:07 [INFO] Executing Step 2: PromptGeneration
2024-10-21 19:03:07 [INFO] Using prompt:
....
2024-10-21 19:03:07 [INFO] Executing Step 3: CodeGenerator
2024-10-21 19:03:11 [ERROR] Pipeline failed on step 3: No code found in the response
The text was updated successfully, but these errors were encountered: