(identity: KimiHostIdentity | undefined)
| 138 | } |
| 139 | |
| 140 | export function assertKimiHostIdentity(identity: KimiHostIdentity | undefined): KimiHostIdentity { |
| 141 | if (identity === undefined) { |
| 142 | throw new Error('Kimi host identity is required. Pass the host product name and version.'); |
| 143 | } |
| 144 | requiredAsciiHeader(identity.userAgentProduct, 'Kimi identity product'); |
| 145 | requiredAsciiHeader(identity.version, 'Kimi identity version'); |
| 146 | return identity; |
| 147 | } |
| 148 | |
| 149 | function deviceModel(): string { |
| 150 | const os = type(); |
no test coverage detected