mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-05 00:45:29 +08:00
Unify Claude count_tokens, legacy stream accounting, and legacy render usage with preserved prompt text so Claude stops falling back to lossy message formatting.
8 lines
215 B
Go
8 lines
215 B
Go
package claude
|
|
|
|
import "ds2api/internal/prompt"
|
|
|
|
func buildClaudePromptTokenText(messages []any, thinkingEnabled bool) string {
|
|
return prompt.MessagesPrepareWithThinking(toMessageMaps(messages), thinkingEnabled)
|
|
}
|