make key snippets available to expert

This commit is contained in:
AI Christianson 2024-12-11 14:07:18 -05:00
parent 6b56a0e198
commit a80710a65b
1 changed files with 8 additions and 0 deletions

View File

@ -43,6 +43,8 @@ def ask_expert(question: str) -> str:
The expert can be extremely useful at logic questions, debugging, and reviewing complex source code, but you must provide all context including source manually.
The query will automatically include any key facts and code snippets from memory, along with any additional context you've provided.
Try to phrase your question in a way that it does not expand the scope of our top-level task.
The expert can be prone to overthinking depending on what and how you ask it.
@ -64,6 +66,12 @@ def ask_expert(question: str) -> str:
query_parts.append("# Key Facts About This Project")
query_parts.append(key_facts)
# Add key snippets if they exist
key_snippets = get_memory_value('key_snippets')
if key_snippets and len(key_snippets) > 0:
query_parts.append('# Key Snippets')
query_parts.append(key_snippets)
# Add other context if it exists
if expert_context:
query_parts.append("\n# Additional Context")