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
Callback function to determine whether the pagination button is working.
126
-
127
-
Args:
128
-
is_next_page: A boolean value indicating whether the page is navigated to the next page or the content within pagination component is changed.
129
-
"""
130
-
returnis_next_page
131
-
132
-
res=awaitllm_tool_call(
133
-
llm=ctx.llm,
134
-
tool=callback,
135
-
messages=[
136
-
ChatCompletionSystemMessageParam(
137
-
role="system",
138
-
content=dedent(
139
-
"""
140
-
Compare the screenshots of the page before and after clicking the pagination button to determine whether the pagination button is working.
141
-
142
-
## Provided Context
143
-
- The URL of the page before clicking the pagination button.
144
-
- The title of the page before clicking the pagination button.
145
-
- The URL of the page after clicking the pagination button.
146
-
- The title of the page after clicking the pagination button.
147
-
- The screenshot of the page before clicking the pagination button.
148
-
- The screenshot of the page after clicking the pagination button.
149
-
150
-
## Instructions
151
-
152
-
Follow the instructions to determine whether the pagination button is working:
153
-
1. Review the screenshot of the page before clicking the pagination button (the first screenshot) and think if the page actually supports pagination.
154
-
2. Compare the old URL and the new URL to see if the page is navigated to the next page.
155
-
3. Compare the old title and the new title to see the two pages are related.
156
-
4. Compare the first screenshot (the screenshot before clicking the pagination button) with the second screenshot (the screenshot after clicking the pagination button) to see if there are any differences.
157
-
5. Check if previous page and the next page have the same structure but different content. If so, the pagination button is working. Note that opening or closing a popup/modal in the same page is not considered as pagination.
158
-
6. If the pagination button is working, call the tool with `true`. Otherwise, call the tool with `false`.
159
-
"""
128
+
new_title=awaitbrowser.get_page_title()
129
+
130
+
defcallback(is_next_page: bool):
131
+
"""
132
+
Callback function to determine whether the pagination button is working.
133
+
134
+
Args:
135
+
is_next_page: A boolean value indicating whether the page is navigated to the next page or the content within pagination component is changed.
136
+
"""
137
+
returnis_next_page
138
+
139
+
res=awaitllm_tool_call(
140
+
llm=ctx.llm,
141
+
tool=callback,
142
+
messages=[
143
+
ChatCompletionSystemMessageParam(
144
+
role="system",
145
+
content=dedent(
146
+
"""
147
+
Compare the screenshots of the page before and after clicking the pagination button to determine whether the pagination button is working.
148
+
149
+
## Provided Context
150
+
- The URL of the page before clicking the pagination button.
151
+
- The title of the page before clicking the pagination button.
152
+
- The URL of the page after clicking the pagination button.
153
+
- The title of the page after clicking the pagination button.
154
+
- The screenshot of the page before clicking the pagination button.
155
+
- The screenshot of the page after clicking the pagination button.
156
+
157
+
## Instructions
158
+
159
+
Follow the instructions to determine whether the pagination button is working:
160
+
1. Review the screenshot of the page before clicking the pagination button (the first screenshot) and think if the page actually supports pagination.
161
+
2. Compare the old URL and the new URL to see if the page is navigated to the next page.
162
+
3. Compare the old title and the new title to see the two pages are related.
163
+
4. Compare the first screenshot (the screenshot before clicking the pagination button) with the second screenshot (the screenshot after clicking the pagination button) to see if there are any differences.
164
+
5. Check if previous page and the next page have the same structure but different content. If so, the pagination button is working. Note that opening or closing a popup/modal in the same page is not considered as pagination.
165
+
6. If the pagination button is working, call the tool with `true`. Otherwise, call the tool with `false`.
0 commit comments