You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pr_agent/settings/pr_help_prompts.toml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The output must be a YAML object equivalent to type $DocHelper, according to the
13
13
=====
14
14
class relevant_section(BaseModel):
15
15
file_name: str = Field(description="The name of the relevant file")
16
-
relevant_section_header_string: str = Field(description="From the relevant file, exact text of the relevant section heading. If no markdown heading is relevant, return empty string")
16
+
relevant_section_header_string: str = Field(description="The exact text of the relevant markdown section heading from the relevant file (starting with '#', '##', etc.). Return empty string if the entire file is the relevant section, or if the relevant section has no heading")
get_logger().exception(f"Error while formatting markdown header", artifacts={'header': header})
94
+
return""
95
+
96
+
68
97
asyncdefrun(self):
69
98
try:
70
99
ifself.question_str:
@@ -106,16 +135,27 @@ async def run(self):
106
135
get_logger().debug(f"Token count of full documentation website: {token_count}")
107
136
108
137
model=get_settings().config.model
109
-
max_tokens_full=MAX_TOKENS[model] # note - here we take the actual max tokens, without any reductions. we do aim to get the full documentation website in the prompt
138
+
ifmodelinMAX_TOKENS:
139
+
max_tokens_full=MAX_TOKENS[model] # note - here we take the actual max tokens, without any reductions. we do aim to get the full documentation website in the prompt
140
+
else:
141
+
max_tokens_full=get_max_tokens(model)
110
142
delta_output=2000
111
143
iftoken_count>max_tokens_full-delta_output:
112
144
get_logger().info(f"Token count {token_count} exceeds the limit {max_tokens_full-delta_output}. Skipping the PR Help message.")
0 commit comments