-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathchatbot.log
151 lines (151 loc) · 14 KB
/
chatbot.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
Created default chainlit markdown file at /Users/stitch/Documents/code-23/data analysis agent/chainlit.md
Your app is available at http://localhost:8000
Translation file for en-GB not found. Using default translation en-US.
Translated markdown file for en-GB not found. Defaulting to chainlit.md.
Translation file for en-GB not found. Using default translation en-US.
Your app is available at http://localhost:8000
Translation file for en-GB not found. Using default translation en-US.
Translated markdown file for en-GB not found. Defaulting to chainlit.md.
Your app is available at http://localhost:8000
Translation file for en-GB not found. Using default translation en-US.
Translated markdown file for en-GB not found. Defaulting to chainlit.md.
Translation file for en-GB not found. Using default translation en-US.
Translation file for en-GB not found. Using default translation en-US.
Translation file for en-GB not found. Using default translation en-US.
Translated markdown file for en-US not found. Defaulting to chainlit.md.
Translation file for en-GB not found. Using default translation en-US.
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
User message: top 10 movies
Assistant response: None
Calling query_db with {'sql_query': 'SELECT title, director, year, rating, genres FROM movies LIMIT 10'}
Tool Call: {'tool_call_id': 'call_IEC6mGcIJXShLYSmqCHyNWPo', 'role': 'tool', 'name': 'query_db', 'content': '| title | director | year | rating | genres |\n| --- | --- | --- | --- | --- |\n| 12 Angry Men | Sidney Lumet | 1957 | APPROVED | Crime, Drama |\n| 12 Years a Slave | Steve McQueen | 2013 | R | Biography, Drama, History |\n| 2001: A Space Odyssey | Stanley Kubrick | 1968 | G | Adventure, Sci-Fi |\n| 3 Idiots | Rajkumar Hirani | 2009 | PG-13 | Comedy, Drama |\n| 8½ | Federico Fellini | 1963 | NOT RATED | Drama |\n| A Beautiful Mind | Ron Howard | 2001 | PG-13 | Biography, Drama |\n| A Clockwork Orange | Stanley Kubrick | 1971 | R | Crime, Drama, Sci-Fi |\n| A Separation | Asghar Farhadi | 2011 | PG-13 | Drama, Mystery |\n| A Wednesday | Neeraj Pandey | 2008 | NOT RATED | Crime, Drama, Mystery |\n| Alien | Ridley Scott | 1979 | R | Horror, Sci-Fi |\n'}
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
User message: how are these top 10 ?
Assistant response: The top 10 movies are based on the initial 10 movies in the database. If you have specific criteria or ratings in mind for what defines the "top" movies, please let me know and I can retrieve movies based on those criteria.
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
User message: when I say top 10 I mean best reviewed
Assistant response: None
Calling query_db with {'sql_query': 'SELECT title, director, year, rating, genres, imdb_score, imdb_votes FROM movies ORDER BY imdb_score DESC, imdb_votes DESC LIMIT 10'}
Tool Call: {'tool_call_id': 'call_xh1zEhwga5nvbSypNmwDcrmT', 'role': 'tool', 'name': 'query_db', 'content': "| title | director | year | rating | genres | imdb_score | imdb_votes |\n| --- | --- | --- | --- | --- | --- | --- |\n| The Shawshank Redemption | Frank Darabont | 1994 | R | Drama | 9.3 | 1967060 |\n| The Godfather | Francis Ford Coppola | 1972 | R | Crime, Drama | 9.2 | 1353121 |\n| The Dark Knight | Christopher Nolan | 2008 | PG-13 | Action, Crime, Drama | 9 | 1937798 |\n| The Godfather: Part II | Francis Ford Coppola | 1974 | R | Crime, Drama | 9 | 931660 |\n| Pulp Fiction | Quentin Tarantino | 1994 | R | Crime, Drama | 8.9 | 1537588 |\n| The Lord of the Rings: The Return of the King | Peter Jackson | 2003 | PG-13 | Adventure, Drama, Fantasy | 8.9 | 1408815 |\n| Schindler's List | Steven Spielberg | 1993 | R | Biography, Drama, History | 8.9 | 1016413 |\n| The Good, the Bad and the Ugly | Sergio Leone | 1966 | R | Western | 8.9 | 586129 |\n| 12 Angry Men | Sidney Lumet | 1957 | APPROVED | Crime, Drama | 8.9 | 551194 |\n| Inception | Christopher Nolan | 2010 | PG-13 | Action, Adventure, Sci-Fi | 8.8 | 1721888 |\n"}
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
Your app is available at http://localhost:8000
Translation file for en-GB not found. Using default translation en-US.
Translated markdown file for en-GB not found. Defaulting to chainlit.md.
Translated markdown file for en-US not found. Defaulting to chainlit.md.
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
User message: top 10 movies
Assistant response: None
Calling query_db with {'sql_query': 'SELECT title, director, year, rating, genres, runtime FROM movies LIMIT 10'}
Tool Call: {'tool_call_id': 'call_wUsmhAlOM5NzfBWsUPvFrp2A', 'role': 'tool', 'name': 'query_db', 'content': '| title | director | year | rating | genres | runtime |\n| --- | --- | --- | --- | --- | --- |\n| 12 Angry Men | Sidney Lumet | 1957 | APPROVED | Crime, Drama | 96 |\n| 12 Years a Slave | Steve McQueen | 2013 | R | Biography, Drama, History | 134 |\n| 2001: A Space Odyssey | Stanley Kubrick | 1968 | G | Adventure, Sci-Fi | 149 |\n| 3 Idiots | Rajkumar Hirani | 2009 | PG-13 | Comedy, Drama | 170 |\n| 8½ | Federico Fellini | 1963 | NOT RATED | Drama | 138 |\n| A Beautiful Mind | Ron Howard | 2001 | PG-13 | Biography, Drama | 135 |\n| A Clockwork Orange | Stanley Kubrick | 1971 | R | Crime, Drama, Sci-Fi | 136 |\n| A Separation | Asghar Farhadi | 2011 | PG-13 | Drama, Mystery | 123 |\n| A Wednesday | Neeraj Pandey | 2008 | NOT RATED | Crime, Drama, Mystery | 104 |\n| Alien | Ridley Scott | 1979 | R | Horror, Sci-Fi | 116 |\n'}
Translation file for en-GB not found. Using default translation en-US.
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
Translation file for en-GB not found. Using default translation en-US.
Your app is available at http://localhost:8002
Translation file for en-GB not found. Using default translation en-US.
Translation file for en-GB not found. Using default translation en-US.
Translated markdown file for en-GB not found. Defaulting to chainlit.md.
Translated markdown file for en-US not found. Defaulting to chainlit.md.
Translation file for en-GB not found. Using default translation en-US.
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
User message: scatter plot of number of movies over last 10 years
Assistant response: None
Calling query_db with {'sql_query': 'SELECT year as year, COUNT(id) as num_movies FROM movies GROUP BY year ORDER BY year DESC LIMIT 10'}
Tool Call: {'tool_call_id': 'call_i7HI6vtspd19ODB4EDthpnKL', 'role': 'tool', 'name': 'query_db', 'content': '| year | num_movies |\n| --- | --- |\n| 2018 | 3 |\n| 2017 | 4 |\n| 2016 | 5 |\n| 2015 | 4 |\n| 2014 | 6 |\n| 2013 | 4 |\n| 2012 | 4 |\n| 2011 | 5 |\n| 2010 | 5 |\n| 2009 | 6 |\n'}
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
Calling plot_chart with {'plot_type': 'scatter', 'x_values': ['2018', '2017', '2016', '2015', '2014', '2013', '2012', '2011', '2010', '2009'], 'y_values': [3, 4, 5, 4, 6, 4, 4, 5, 5, 6], 'plot_title': 'Number of Movies Over Last 10 Years', 'x_label': 'Year', 'y_label': 'Number of Movies'}
Tool Call: {'tool_call_id': 'call_7T0jc70vdUxFOp8hdBg1lu8r', 'role': 'tool', 'name': 'plot_chart', 'content': Figure({
'data': [{'marker': {'color': '#df84ff', 'line': {'width': 1}, 'opacity': 0.7, 'size': 10},
'mode': 'markers',
'type': 'scatter',
'x': [2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009],
'y': [3, 4, 5, 4, 6, 4, 4, 5, 5, 6]}],
'layout': {'margin': {'b': 60, 'l': 60, 'r': 60, 't': 80},
'paper_bgcolor': '#f8f8f8',
'plot_bgcolor': '#f8f8f8',
'template': '...',
'title': {'font': {'color': '#333', 'family': 'Arial', 'size': 20},
'text': 'Number of Movies Over Last 10 Years Scatter Chart'},
'xaxis': {'gridcolor': '#f0f0f0',
'tickfont': {'size': 14},
'title': {'font': {'size': 18}, 'text': 'Year'}},
'yaxis': {'gridcolor': '#f0f0f0',
'tickfont': {'size': 14},
'title': {'font': {'size': 18}, 'text': 'Number of Movies'}}}
})}
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
Your app is available at http://localhost:8002
Translation file for en-GB not found. Using default translation en-US.
Translated markdown file for en-GB not found. Defaulting to chainlit.md.
Translated markdown file for en-US not found. Defaulting to chainlit.md.
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
User message: show top movies based on imdb scores
Assistant response: None
Calling query_db with {'sql_query': 'SELECT title, imdb_score FROM movies ORDER BY imdb_score DESC LIMIT 5'}
Tool Call: {'tool_call_id': 'call_wmDffeitXXM3cpkB0PYtR4gS', 'role': 'tool', 'name': 'query_db', 'content': '| title | imdb_score |\n| --- | --- |\n| The Shawshank Redemption | 9.3 |\n| The Godfather | 9.2 |\n| The Dark Knight | 9 |\n| The Godfather: Part II | 9 |\n| 12 Angry Men | 8.9 |\n'}
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
Calling plot_chart with {'plot_type': 'bar', 'x_values': ['The Shawshank Redemption', 'The Godfather', 'The Dark Knight', 'The Godfather: Part II', '12 Angry Men'], 'y_values': [9.3, 9.2, 9, 9, 8.9], 'plot_title': 'Top Movies Based on IMDB Scores', 'x_label': 'Movies', 'y_label': 'IMDB Scores'}
Tool Call: {'tool_call_id': 'call_7unT5WZUu9ySKj4rY1DlO481', 'role': 'tool', 'name': 'plot_chart', 'content': Figure({
'data': [{'marker': {'color': '#24C8BF', 'line': {'width': 1}},
'type': 'bar',
'x': [The Shawshank Redemption, The Godfather, The Dark Knight, The
Godfather: Part II, 12 Angry Men],
'y': [9.3, 9.2, 9, 9, 8.9]}],
'layout': {'margin': {'b': 60, 'l': 60, 'r': 60, 't': 80},
'paper_bgcolor': '#f8f8f8',
'plot_bgcolor': '#f8f8f8',
'template': '...',
'title': {'font': {'color': '#333', 'family': 'Arial', 'size': 20},
'text': 'Top Movies Based on IMDB Scores Bar Chart'},
'xaxis': {'gridcolor': '#f0f0f0',
'tickfont': {'size': 14},
'title': {'font': {'size': 18}, 'text': 'Movies'}},
'yaxis': {'gridcolor': '#f0f0f0',
'tickfont': {'size': 14},
'title': {'font': {'size': 18}, 'text': 'IMDB Scores'}}}
})}
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
User message: tell me about popular actors
Assistant response: None
Calling query_db with {'sql_query': 'SELECT name, COUNT(name) as appearance_count FROM actors GROUP BY name ORDER BY appearance_count DESC LIMIT 5'}
Tool Call: {'tool_call_id': 'call_Axv1ZFZHPwzOk4nZ1eFXmCq9', 'role': 'tool', 'name': 'query_db', 'content': '| name | appearance_count |\n| --- | --- |\n| Paul Bateman | 5 |\n| Norman Gay | 4 |\n| Noriko Honma | 4 |\n| Kevin Spacey | 4 |\n| John Rhys-Davies | 4 |\n'}
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
User message: show me movie trends in last 5 years
Assistant response: None
Calling query_db with {'sql_query': "SELECT year, COUNT(title) as movie_count FROM movies WHERE year >= (strftime('%Y', 'now') - 5) GROUP BY year ORDER BY year"}
Tool Call: {'tool_call_id': 'call_HoIevkGplv4Wo9RaRY4PpHAu', 'role': 'tool', 'name': 'query_db', 'content': '| year | movie_count |\n| --- | --- |\n'}
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
User message: ok, over 10 years
Assistant response: None
Calling query_db with {'sql_query': "SELECT year, COUNT(title) as movie_count FROM movies WHERE year >= (strftime('%Y', 'now') - 10) GROUP BY year ORDER BY year"}
Tool Call: {'tool_call_id': 'call_jOhpymM38RyaoyR6iqDhuktu', 'role': 'tool', 'name': 'query_db', 'content': '| year | movie_count |\n| --- | --- |\n| 2014 | 6 |\n| 2015 | 4 |\n| 2016 | 5 |\n| 2017 | 4 |\n| 2018 | 3 |\n'}
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
User message: plot it
Assistant response: None
Calling plot_chart with {'plot_type': 'line', 'x_values': ['2014', '2015', '2016', '2017', '2018'], 'y_values': [6, 4, 5, 4, 3], 'plot_title': 'Movie Trends Over the Last 10 Years', 'x_label': 'Year', 'y_label': 'Number of Movies'}
Tool Call: {'tool_call_id': 'call_BNrfo3QxesPmNOWqROfebX6s', 'role': 'tool', 'name': 'plot_chart', 'content': Figure({
'data': [{'line': {'color': '#ff9900', 'width': 2},
'marker': {'color': '#ff9900', 'line': {'width': 1}, 'size': 8},
'mode': 'lines+markers',
'type': 'scatter',
'x': [2014, 2015, 2016, 2017, 2018],
'y': [6, 4, 5, 4, 3]}],
'layout': {'margin': {'b': 60, 'l': 60, 'r': 60, 't': 80},
'paper_bgcolor': '#f8f8f8',
'plot_bgcolor': '#f8f8f8',
'template': '...',
'title': {'font': {'color': '#333', 'family': 'Arial', 'size': 20},
'text': 'Movie Trends Over the Last 10 Years Line Chart'},
'xaxis': {'gridcolor': '#f0f0f0',
'tickfont': {'size': 14},
'title': {'font': {'size': 18}, 'text': 'Year'}},
'yaxis': {'gridcolor': '#f0f0f0',
'tickfont': {'size': 14},
'title': {'font': {'size': 18}, 'text': 'Number of Movies'}}}
})}
HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
Translation file for en-GB not found. Using default translation en-US.