mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 11:33:14 +00:00
fix: Proper formatting for anthropic vs non anthropic prompts (#570)
This commit is contained in:
parent
8e5414ce2b
commit
c99ec10514
1 changed files with 7 additions and 9 deletions
|
|
@ -80,15 +80,13 @@ const formatStaticInstructionsPrompt = (
|
|||
state: GraphState,
|
||||
isAnthropicModel: boolean,
|
||||
) => {
|
||||
return isAnthropicModel
|
||||
? STATIC_ANTHROPIC_SYSTEM_INSTRUCTIONS
|
||||
: STATIC_SYSTEM_INSTRUCTIONS.replaceAll(
|
||||
"{REPO_DIRECTORY}",
|
||||
getRepoAbsolutePath(state.targetRepository),
|
||||
).replaceAll(
|
||||
"{CUSTOM_RULES}",
|
||||
formatCustomRulesPrompt(state.customRules),
|
||||
);
|
||||
return (
|
||||
isAnthropicModel
|
||||
? STATIC_ANTHROPIC_SYSTEM_INSTRUCTIONS
|
||||
: STATIC_SYSTEM_INSTRUCTIONS
|
||||
)
|
||||
.replaceAll("{REPO_DIRECTORY}", getRepoAbsolutePath(state.targetRepository))
|
||||
.replaceAll("{CUSTOM_RULES}", formatCustomRulesPrompt(state.customRules));
|
||||
};
|
||||
|
||||
const formatCacheablePrompt = (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue