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,
|
DEFAULT_TEST_CMD_TIMEOUT,
|
||||||
VALID_PROVIDERS,
|
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.console.output import cpm
|
||||||
from ra_aid.database import (
|
from ra_aid.database import (
|
||||||
DatabaseManager,
|
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.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.tool_configs import get_chat_tools, set_modification_tools
|
||||||
from ra_aid.tools.human import ask_human
|
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__)
|
logger = get_logger(__name__)
|
||||||
|
|
||||||
|
|
@ -523,6 +525,8 @@ def main():
|
||||||
),
|
),
|
||||||
working_directory=working_directory,
|
working_directory=working_directory,
|
||||||
current_date=current_date,
|
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,
|
project_info=formatted_project_info,
|
||||||
),
|
),
|
||||||
config,
|
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 mode prompt for interactive mode
|
||||||
CHAT_PROMPT = """Working Directory: {working_directory}
|
CHAT_PROMPT = """Working Directory: {working_directory}
|
||||||
Current Date: {current_date}
|
Current Date: {current_date}
|
||||||
|
|
||||||
|
<key facts>
|
||||||
|
{key_facts}
|
||||||
|
</key facts>
|
||||||
|
|
||||||
|
<key snippets>
|
||||||
|
{key_snippets}
|
||||||
|
</key snippets>
|
||||||
|
|
||||||
Project Info:
|
Project Info:
|
||||||
{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 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.
|
- 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.
|
- 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>
|
||||||
{initial_request}
|
{initial_request}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue