-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Added Poe-api as LLM reference #425
Conversation
Iamprashanth-1
commented
Aug 2, 2023
•
edited
Loading
edited
- closes #xxxx (Replace xxxx with the GitHub issue number)
- Tests added and passed if fixing a bug or adding a new feature
- All code checks passed.
Adding Poe-api support because people don't have billing on their account or their API limit is exceeded they use this poe-api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried to run this ? I get a AttributeError: 'NoneType' object has no attribute 'group'
(same specifying formkey
, same installing poe
with -U
).
Besides, this implementation contains quite a lot of leftovers from your copy-paste of the gpt4all PR and some encapsulation mistakes. If you have a fix for the first problem (which seems to be a known issue, see here), I will be happy to leave a more detailed review.
can you let me know which bot have you tried? mostly it works well with Assitant and ChatGpt. (Ya I have Copied all gpt4all PR because I didn't thought of going to entire code as I want to use this pandasai so instantly copied gpt4all and replaced components with poe-api) I agree I have copied |
I tried chinchilla, but the problem's not there. This simple snippet fails for me import poe
token=...
formkey=...
client = poe.Client(token=token, formkey=formkey) There are multiple issues reporting the same error I mentioned in my previous comment. Seems to be something recurrent. Have a look here |
Here Is the example: from pandasai import PandasAI llm = POEAPI(bot_name='chinchilla',token = '') Just try this once: don't need to provide formkey. To get token go through readme once There are some issues using poe-api but chatgpt and assitant works fine |
As explained above, it does not work for me neither with nor without the Traceback (most recent call last):
File "C:\Users\mpronesti\dev\pandas-ai\examples\from_dataframe.py", line 11, in <module>
llm = POEAPI(token='CENSORED', bot_name='chinchilla')
File "C:\Users\mpronesti\AppData\Local\Programs\Python\Python310\lib\site-packages\pandasai\llm\poe_api.py", line 80, in __init__
self.poe_api_bot = poe.Client(token=self.token)
File "C:\Users\mpronesti\AppData\Local\Programs\Python\Python310\lib\site-packages\poe\__init__.py", line 156, in __init__
self.connect_ws()
File "C:\Users\mpronesti\AppData\Local\Programs\Python\Python310\lib\site-packages\poe\__init__.py", line 446, in connect_ws
self.setup_connection()
File "C:\Users\mpronesti\AppData\Local\Programs\Python\Python310\lib\site-packages\poe\__init__.py", line 182, in setup_connection
self.next_data = self.get_next_data(overwrite_vars=True)
File "C:\Users\mpronesti\AppData\Local\Programs\Python\Python310\lib\site-packages\poe\__init__.py", line 246, in get_next_data
json_text = re.search(json_regex, r.text).group(1)
AttributeError: 'NoneType' object has no attribute 'group' |
but when I tried It's working fine. can you check your poe.com account whether promt is available in respective bot. P.s you copied token from poe.com account right i.e (p_b value) |
Of course. An invalid or missing token in poe api would raise the following error |
Can you update poe-api package to latest version and try once |