Skip to content

Commit b2fea5a

Browse files
committed
improve error message for no llm available
1 parent 20241be commit b2fea5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandasai/agent/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ def chat(self, query: str, output_type: Optional[str] = None):
8585
Start a new chat interaction with the assistant on Dataframe.
8686
"""
8787
if self._state.config.llm is None:
88-
raise ValueError("No LLM provided. Please provide an LLM to the agent.")
88+
raise ValueError(
89+
"PandasAI API key does not include LLM credits. Please configure an OpenAI or LiteLLM key. "
90+
"Learn more at: https://docs.pandas-ai.com/v3/large-language-models#how-to-set-up-any-llm%3F"
91+
)
8992

9093
self.start_new_conversation()
9194
return self._process_query(query, output_type)

0 commit comments

Comments
 (0)