You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So i tried to use pandasai with pai api but that is not working, its saying invalid api key
code:-
`import pandasai as pai
# Sample DataFrame
df = pai.DataFrame({
"country": ["United States", "United Kingdom", "France", "Germany", "Italy", "Spain", "Canada", "Australia", "Japan", "China"],
"revenue": [5000, 3200, 2900, 4100, 2300, 2100, 2500, 2600, 4500, 7000]
})
# By default, unless you choose a different LLM, it will use BambooLLM.
# You can get your free API key signing up at https://app.pandabi.ai (you can also configure it in your .env file)
pai.api_key.set("PAI-e1f665a7-40f5-4b2a-9295-f78ba88f2119")
df.chat('Which are the top 5 countries by sales?')`
for that im getting error:-
`PandaAIApiCallError` Traceback (most recent call last)
[<ipython-input-14-36b89a68d37e>](https://localhost:8080/#) in <cell line: 0>()
11 pai.api_key.set("PAI-e1f665a7-40f5-4b2a-9295-f78ba88f2119")
12
---> 13 df.chat('Which are the top 5 countries by sales?')
9 frames
[/usr/local/lib/python3.11/dist-packages/pandasai/helpers/session.py](https://localhost:8080/#) in make_request(self, method, path, headers, params, data, json, timeout, **kwargs)
96 raise PandaAIApiCallError(data["message"])
97 elif "detail" in data:
---> 98 raise PandaAIApiCallError(data["detail"])
99
100 return data
PandaAIApiCallError: Invalid API key
api key actually correct ,but still getting this error
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So i tried to use pandasai with pai api but that is not working, its saying invalid api key
code:-
for that im getting error:-
api key actually correct ,but still getting this error
**
Please help me**
Beta Was this translation helpful? Give feedback.
All reactions