Sinaptik-AI / pandas-ai

Chat with your database (SQL, CSV, pandas, polars, mongodb, noSQL, etc). PandasAI makes data analysis conversational using LLMs (GPT 3.5 / 4, Anthropic, VertexAI) and RAG.
https://pandas-ai.com
Other
11.87k stars 1.11k forks source link

ERNIE BOT response </startCode> end tag #389

Closed wsf1990 closed 11 months ago

wsf1990 commented 11 months ago

🚀 The feature

I use ERNIE BOT with langchain. And the bot response the code endswith </startCode> and raise can't found code error. I read the source code and found it just parse .So can we replace the </startCode> to <endCode>? The whole response like this:

```python
<startCode>
import pandas as pd

data = {
    ....
}

df = pd.DataFrame(data)
print(df)
</startCode>
```

Motivation, pitch

ERNIE bot cant response code endswith <endCode> but </startCode>

Alternatives

No response

Additional context

No response

gventuri commented 11 months ago

@wsf1990 should have been fixed with version 0.7.1

wsf1990 commented 11 months ago

I'm sorry, a new situation meet. The bot response with both two endtag,like this:

```python
<startCode>
import pandas as pd

df = pd.read_csv('data.csv')
print(df.head())
</startCode>
<endCode>
```