Skip to content

Commit

Permalink
feat(deepseek-adapter): update user message content to 'Continue outp…
Browse files Browse the repository at this point in the history
…ut' for clarity
  • Loading branch information
dingyi222666 committed Jan 22, 2025
1 parent 7afe12a commit 2a3f5bc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/deepseek-adapter/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function langchainMessageToDeepseekMessage(
) {
result.push({
role: 'user',
content: 'Continue'
content: 'Continue output'
})
}
}
Expand All @@ -142,6 +142,15 @@ export function langchainMessageToDeepseekMessage(
}
}

const lastMessage = result[result.length - 1]

if (lastMessage.role === 'assistant') {
result.push({
role: 'user',
content: 'Continue output'
})
}

return result
}

Expand Down

0 comments on commit 2a3f5bc

Please sign in to comment.