Spaces:
Runtime error
Runtime error
Changes on the code generation prompting to avoid failures
Browse files
chains/code_generator/templates.py
CHANGED
@@ -13,7 +13,8 @@ system_template_script = PromptTemplate(
|
|
13 |
The example of the html content is: {html_content}
|
14 |
--------------------------------
|
15 |
You have to create a python function that extract information from an html code using web scrapping.
|
16 |
-
|
|
|
17 |
|
18 |
Your answer SHOULD only contain the python function code without any aditional word or character.
|
19 |
|
@@ -25,6 +26,8 @@ system_template_script = PromptTemplate(
|
|
25 |
|
26 |
Your function needs to extract information for all the elements with similar attributes.
|
27 |
|
|
|
|
|
28 |
Before calling .text or ['href'] methods, check if the element exists.
|
29 |
|
30 |
----------------
|
|
|
13 |
The example of the html content is: {html_content}
|
14 |
--------------------------------
|
15 |
You have to create a python function that extract information from an html code using web scrapping.
|
16 |
+
|
17 |
+
Try to select the deeper class that is common among the elements to make de find_all function.
|
18 |
|
19 |
Your answer SHOULD only contain the python function code without any aditional word or character.
|
20 |
|
|
|
26 |
|
27 |
Your function needs to extract information for all the elements with similar attributes.
|
28 |
|
29 |
+
An element could have missing attributes
|
30 |
+
|
31 |
Before calling .text or ['href'] methods, check if the element exists.
|
32 |
|
33 |
----------------
|