Skip to content

Commit b23aa8b

Browse files
committed
test(live): add live_test_suggestions for live recommender testing with multiple LLM providers
1 parent b8f86af commit b23aa8b

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

test/live/live_test_suggestions.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from plotsense.visual_suggestion.suggestions import recommender
2+
import pandas as pd
3+
4+
# Example: create a simple DataFrame
5+
df = pd.DataFrame({
6+
"Year": [2020, 2021, 2022, 2023],
7+
"Sales": [150, 200, 250, 300],
8+
"Profit": [40, 50, 65, 80]
9+
})
10+
11+
# Replace with your actual API keys
12+
api_keys = {
13+
"groq": "gsk_xyz",
14+
"openai": "sk-proj-xyz-abc",
15+
"azure": "ghp_xyz",
16+
}
17+
18+
# Run the recommender
19+
recommendations = recommender(
20+
df,
21+
n=3, # number of visualizations to recommend
22+
api_keys=api_keys,
23+
selected_models=[("azure", "openai/gpt-5")],
24+
)
25+
26+
# Display the recommendations
27+
print("📊 Recommended visualizations:")
28+
print(recommendations)
29+

0 commit comments

Comments
 (0)