Spaces:
Running
Running
Commit
·
3c9ad8a
1
Parent(s):
ebb2635
updated prompt
Browse files- main.py +1 -1
- src/models/system5.prompt +1 -1
- src/tools/default_tools/get_website_tool.py +1 -1
main.py
CHANGED
|
@@ -180,7 +180,7 @@ no_auth = args.no_auth
|
|
| 180 |
|
| 181 |
with gr.Blocks(title="HASHIRU AI", css=css, fill_width=True, fill_height=True) as demo:
|
| 182 |
model_manager = GeminiManager(
|
| 183 |
-
gemini_model="gemini-2.
|
| 184 |
|
| 185 |
def update_model(modeIndexes: List[int]):
|
| 186 |
modes = [Mode(i+1) for i in modeIndexes]
|
|
|
|
| 180 |
|
| 181 |
with gr.Blocks(title="HASHIRU AI", css=css, fill_width=True, fill_height=True) as demo:
|
| 182 |
model_manager = GeminiManager(
|
| 183 |
+
gemini_model="gemini-2.5-flash-preview-04-17", modes=[mode for mode in Mode])
|
| 184 |
|
| 185 |
def update_model(modeIndexes: List[int]):
|
| 186 |
modes = [Mode(i+1) for i in modeIndexes]
|
src/models/system5.prompt
CHANGED
|
@@ -17,7 +17,7 @@ Your role involves the following steps:
|
|
| 17 |
|
| 18 |
1. **Tool Creation (`ToolCreator`):** Before creating any new tool, you **must** first inspect existing toolsets. Use the `ListFiles` tool to check `src/tools/default_tools` and `src/tools/user_tools`, then `ReadFile` to understand schema on how to create a new tool.
|
| 19 |
* Once you understand the schema, invoke `ToolCreator` to build a new one. New tools must be production-ready:
|
| 20 |
-
* Use existing packages and libraries where possible.
|
| 21 |
* Implement full functionality (no stubs or placeholders).
|
| 22 |
* Include robust input validation and error handling.
|
| 23 |
* Provide clear logging or helpful runtime messages for debugging and monitoring.
|
|
|
|
| 17 |
|
| 18 |
1. **Tool Creation (`ToolCreator`):** Before creating any new tool, you **must** first inspect existing toolsets. Use the `ListFiles` tool to check `src/tools/default_tools` and `src/tools/user_tools`, then `ReadFile` to understand schema on how to create a new tool.
|
| 19 |
* Once you understand the schema, invoke `ToolCreator` to build a new one. New tools must be production-ready:
|
| 20 |
+
* Use existing packages and libraries where possible ( you can use any python3 compatible library).
|
| 21 |
* Implement full functionality (no stubs or placeholders).
|
| 22 |
* Include robust input validation and error handling.
|
| 23 |
* Provide clear logging or helpful runtime messages for debugging and monitoring.
|
src/tools/default_tools/get_website_tool.py
CHANGED
|
@@ -128,7 +128,7 @@ class GetWebsite():
|
|
| 128 |
if css_selector:
|
| 129 |
# Extract text from the selected elements
|
| 130 |
elements = soup.select(css_selector)
|
| 131 |
-
text = '\n'.join([element.get_text() for element in elements])
|
| 132 |
else:
|
| 133 |
# Extract text from the parsed HTML
|
| 134 |
text = soup.get_text()
|
|
|
|
| 128 |
if css_selector:
|
| 129 |
# Extract text from the selected elements
|
| 130 |
elements = soup.select(css_selector)
|
| 131 |
+
text = ('\n'.join([element.get_text() for element in elements])).encode('utf-8', 'ignore').decode('utf-8')
|
| 132 |
else:
|
| 133 |
# Extract text from the parsed HTML
|
| 134 |
text = soup.get_text()
|