mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-05 21:12:13 +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,
|
state: GraphState,
|
||||||
isAnthropicModel: boolean,
|
isAnthropicModel: boolean,
|
||||||
) => {
|
) => {
|
||||||
return isAnthropicModel
|
return (
|
||||||
? STATIC_ANTHROPIC_SYSTEM_INSTRUCTIONS
|
isAnthropicModel
|
||||||
: STATIC_SYSTEM_INSTRUCTIONS.replaceAll(
|
? STATIC_ANTHROPIC_SYSTEM_INSTRUCTIONS
|
||||||
"{REPO_DIRECTORY}",
|
: STATIC_SYSTEM_INSTRUCTIONS
|
||||||
getRepoAbsolutePath(state.targetRepository),
|
)
|
||||||
).replaceAll(
|
.replaceAll("{REPO_DIRECTORY}", getRepoAbsolutePath(state.targetRepository))
|
||||||
"{CUSTOM_RULES}",
|
.replaceAll("{CUSTOM_RULES}", formatCustomRulesPrompt(state.customRules));
|
||||||
formatCustomRulesPrompt(state.customRules),
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const formatCacheablePrompt = (
|
const formatCacheablePrompt = (
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue