-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
ChatOpenAI isn't compatible with create_pandas_dataframe_agent #1931
Comments
+1 |
1 similar comment
+1 |
I think this might actually, I think this is a general problem with
|
Based on my understanding this affects more than just
(Note main motivation for wanting to use However even for
(NOTE: I had to indent the last few lines by 4 spaces to get the backticks to render properly, there was no indentation on the actual output) |
@sundar7D0 , does this issue got resolved? Chat model working with pandas agent? |
I think with some fixes as suggested here and in other issues to resolve the parsing bottleneck, now chat model works with pandas agent! |
Hey @sundar7D0 ! Any chance you can point out the other issues? 🙏 |
Please check #1358 thread |
I am still experiencing this on v0.0.163. I don't have access to gpt4, unfortunately. I don't see a manual workaround here in the thread. Is the fix supposed to be in the repo already? |
I solved this problem by Using AgentType.OPENAI_FUNCTIONS: |
I tried creating a pandas dataframe agent (using create_dataframe_agent) with ChatOpenAI from promptlayer or otherwise just plain version (ChatOpenAI) as the LLM! But langchain isn't able to parse the LLM's output code. If I modify some regular expression manually, it works (but again fails if the code is a single line, etc.). Basically the regex and parsing logic for figuring out Action, Action_input for chat models needs to be changed. This probably means lot of other existing chains with ChatOpenAI as LLM are up for a toss!
Code:
Output:
The text was updated successfully, but these errors were encountered: