rm unused da example

This commit is contained in:
garylin2099 2024-10-31 14:31:32 +08:00
parent 1c3bb42afa
commit 01ed9735da

View file

@ -668,9 +668,9 @@ class KeywordExpRetriever(ExpRetriever):
if "search" in context.lower() or "click" in context.lower():
return WEB_SCRAPING_EXAMPLE
return WEB_SCRAPING_EXAMPLE_SIMPLE
elif exp_type == "task":
if "diagnose" in context.lower():
return SEARCH_SYMBOL_EXAMPLE
# elif exp_type == "task":
# if "diagnose" in context.lower():
# return SEARCH_SYMBOL_EXAMPLE
return ""
@ -766,58 +766,6 @@ Explanation: The requirement is to fix an issue in an existing repository. The p
```
"""
SEARCH_SYMBOL_EXAMPLE = """
## Past Experience 1
Issue: _achat_completion_stream in metagpt/provider/openai_api.py produced TypeError: openai.types.completion_usage.CompletionUsage() argument after ** must be a mapping, not NoneType
Explanation: To understand the issue, we first need to know the content of the method. Since the issue provides the specific file, we should directly search the symbol `def _achat_completion_stream` in that file. Notice in previous steps, we already cd to the cloned project folder, the source code is at `metagpt` under the project folder.
```python
from metagpt.tools.libs.editor import Editor
# Initialize the Editor tool
editor = Editor()
# Search for the '_achat_completion_stream' function in the 'openai_api.py' file
symbol_to_search = "def _achat_completion_stream"
file_block = editor.search_content(symbol=symbol_to_search, root_path="metagpt/provider/openai_api.py")
# Output the file block containing the method to diagnose the problem
file_block
```
## Past Experience 2
Issue: PaiEasChatEndpoint._call_eas should return bytes type instead of str type
Explanation: To understand the issue, we first need to know the content of the method. Since no specific file is provided, we can search it in the whole codebase. Therefore, we search the symbol `def _call_eas` in the cloned repo. Notice in previous steps, we already cd to the cloned project folder, the source code is at langchain under the project folder.
```python
from metagpt.tools.libs.editor import Editor
editor = Editor()
# Search for the PaiEasChatEndpoint._call_eas method in the codebase to understand the issue
symbol_to_search = "def _call_eas"
file_block = editor.search_content(symbol=symbol_to_search, root_path="langchain")
file_block
```
## Past Experience 3
Issue: When I run main.py, a message 'Running on http://127.0.0.1:5000' will appear on the console, but when I click on this link, the front-end web page cannot be displayed correctly.
Explanation: To understand the issue, we first need to know the content of the file. Since the issue doesn't provide a specific method or class, we will not search_content, but directly open and read the file main.py to diagnose the problem. Notice in previous steps, we already cd to the cloned project folder.
```python
from metagpt.tools.libs.editor import Editor
editor = Editor()
# Open the file to understand the issue
editor.read(path="./main.py")
```
## Experience Summary
- When diagnosing an issue, search for the specific symbol in the corresponding file to understand the problem.
- If no specific file is provided, search the symbol in the whole codebase to locate the issue.
- If no specific symbol is provided, directly open and read the file to diagnose the problem.
"""
ENGINEER_EXAMPLE = """
## example 1
User Requirement: Please implement the core game logic for the 2048 game, including tile movements, merging logic, score tracking, and keyboard interaction. Refer to the project schedule located at '/tmp/project_schedule.json' and the system design document at '/tmp/system_design.json' for detailed information.