Skip to content

Commit c1ab584

Browse files
cuipengfeiCopilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5a6809f commit c1ab584

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/lib/headers.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ function isAgentRole(role: string): boolean {
3838
function getSavingsInitiator(
3939
payload: ChatCompletionsPayload,
4040
): "user" | "agent" {
41-
return payload.messages.some((msg) => isAgentRole(msg.role)) ?
42-
"agent"
43-
: "user"
41+
return payload.messages.some((msg) => isAgentRole(msg.role)) ? "agent" : "user"
4442
}
4543

4644
/**

0 commit comments

Comments
 (0)