address pr feedback

This commit is contained in:
Senko Rasic
2024-04-07 18:30:44 -07:00
parent 7eecdda87a
commit cf881aae7f
5 changed files with 14 additions and 13 deletions

View File

@@ -43,5 +43,5 @@ DB_PASSWORD=
# Set extra buffer to wait on top of detected retry time when rate limmit is hit. defaults to 6
# RATE_LIMIT_EXTRA_BUFFER=
# Only send task-relevant files to the LLM. Disabled by default until we're sure it works correctly.
# FILTER_RELEVANT_FILES=false
# Only send task-relevant files to the LLM. Enabled by default; uncomment and set this to "false" to disable.
# FILTER_RELEVANT_FILES=true

View File

@@ -544,7 +544,7 @@ LIST_RELEVANT_FILES = {
"type": "array",
"items": {
"type": "string",
"description": "Path to the file that is relevant for the current task."
"description": "Path to the file that is relevant for the current task, relative to the project root."
},
}
},
@@ -562,15 +562,16 @@ DESCRIBE_FILE = {
"type": "object",
"properties": {
"summary": {
"type": "string",
"description": "Describe in detail the functionality being defined or implemented in this file. Be as detailed as possible."
"type": "string",
"description": "Describe in detail the functionality being defined or implemented in this file. Be as detailed as possible."
},
"references": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of file references."
"type": "array",
"items": {
"type": "string",
"description": "Path to a file that is referenced in the current file, relative to the project root.",
},
"description": "List of file references."
}
},
"required": ["summary", "references"],

View File

@@ -383,7 +383,7 @@ class Project:
:returns: A dictionary of file summaries, or None if file filtering is not enabled.
"""
if os.getenv('FILTER_RELEVANT_FILES', '').lower().strip() not in ['true', '1', 'yes', 'on']:
if os.getenv('FILTER_RELEVANT_FILES', '').lower().strip() in ['false', '0', 'no', 'off']:
return None
files = self.get_all_database_files()

View File

@@ -1125,7 +1125,7 @@ class Developer(Agent):
if not file_summaries:
return None
if os.getenv('FILTER_RELEVANT_FILES', '').lower().strip() not in ['true', '1', 'yes', 'on']:
if os.getenv('FILTER_RELEVANT_FILES', '').lower().strip() in ['false', '0', 'no', 'off']:
return None
convo = AgentConvo(self)

View File

@@ -45,7 +45,7 @@ def _get_describe_messages(fpath: str, content: str) -> list[dict[str, str]]:
def describe_file(project, fpath: str, content: str) -> str:
if os.getenv('FILTER_RELEVANT_FILES', '').lower().strip() not in ['true', '1', 'yes', 'on']:
if os.getenv('FILTER_RELEVANT_FILES', '').lower().strip() in ['false', '0', 'no', 'off']:
return ''
model_name = os.getenv("MODEL_NAME")