include key facts/snippets in chat mode
This commit is contained in:
parent
1c95080897
commit
bd05dee716
|
|
@ -42,6 +42,8 @@ from ra_aid.config import (
|
|||
DEFAULT_TEST_CMD_TIMEOUT,
|
||||
VALID_PROVIDERS,
|
||||
)
|
||||
from ra_aid.database.repositories.key_fact_repository import KeyFactRepository
|
||||
from ra_aid.model_formatters import format_key_facts_dict
|
||||
from ra_aid.console.output import cpm
|
||||
from ra_aid.database import (
|
||||
DatabaseManager,
|
||||
|
|
@ -59,7 +61,7 @@ from ra_aid.prompts.chat_prompts import CHAT_PROMPT
|
|||
from ra_aid.prompts.web_research_prompts import WEB_RESEARCH_PROMPT_SECTION_CHAT
|
||||
from ra_aid.tool_configs import get_chat_tools, set_modification_tools
|
||||
from ra_aid.tools.human import ask_human
|
||||
from ra_aid.tools.memory import _global_memory
|
||||
from ra_aid.tools.memory import _global_memory, get_memory_value
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
|
|
@ -523,6 +525,8 @@ def main():
|
|||
),
|
||||
working_directory=working_directory,
|
||||
current_date=current_date,
|
||||
key_facts=format_key_facts_dict(KeyFactRepository().get_facts_dict()),
|
||||
key_snippets=get_memory_value("key_snippets"),
|
||||
project_info=formatted_project_info,
|
||||
),
|
||||
config,
|
||||
|
|
|
|||
|
|
@ -11,6 +11,15 @@ from ra_aid.prompts.web_research_prompts import WEB_RESEARCH_PROMPT_SECTION_CHAT
|
|||
# Chat mode prompt for interactive mode
|
||||
CHAT_PROMPT = """Working Directory: {working_directory}
|
||||
Current Date: {current_date}
|
||||
|
||||
<key facts>
|
||||
{key_facts}
|
||||
</key facts>
|
||||
|
||||
<key snippets>
|
||||
{key_snippets}
|
||||
</key snippets>
|
||||
|
||||
Project Info:
|
||||
{project_info}
|
||||
|
||||
|
|
@ -88,6 +97,7 @@ You have often been criticized for:
|
|||
- Not calling ask_human at the end, which means the agent loop terminates and dumps the user to the CLI.
|
||||
- Not calling tools/functions properly, e.g. leaving off required arguments, calling a tool in a loop, calling tools inappropriately.
|
||||
- If the user asks you something like "what does this project do?" you have asked clarifying questions when you should have just launched a research task.
|
||||
- Doing too many research tasks when it could all be done with a single request_research_and_implementation call.
|
||||
|
||||
<initial request>
|
||||
{initial_request}
|
||||
|
|
|
|||
Loading…
Reference in New Issue