Skip to content

Commit 18ac6fb

Browse files
[chore] rm old fillInVariables fn (#706)
* rm fillInVariables * changeset
1 parent 346ef5d commit 18ac6fb

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

.changeset/breezy-carpets-press.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@browserbasehq/stagehand": patch
3+
---
4+
5+
remove unused fillInVariables fn

lib/inference.ts

-15
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,6 @@ import {
1616
writeTimestampedTxtFile,
1717
} from "@/lib/inferenceLogUtils";
1818

19-
/**
20-
* Replaces <|VARIABLE|> placeholders in a text with user-provided values.
21-
*/
22-
export function fillInVariables(
23-
text: string,
24-
variables: Record<string, string>,
25-
) {
26-
let processedText = text;
27-
Object.entries(variables).forEach(([key, value]) => {
28-
const placeholder = `<|${key.toUpperCase()}|>`;
29-
processedText = processedText.replace(placeholder, value);
30-
});
31-
return processedText;
32-
}
33-
3419
/** Simple usage shape if your LLM returns usage tokens. */
3520
interface LLMUsage {
3621
prompt_tokens: number;

0 commit comments

Comments
 (0)