feat: ship Wave 5-6 multi-surface hygiene, optimization, and bug fixes
This commit is contained in:
parent
01ef3293cf
commit
66b6b45ba9
399 changed files with 17828 additions and 11330 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { isRecord } from './core-contract.generated.ts'
|
||||
|
||||
export type LlmRole = 'user' | 'assistant'
|
||||
|
||||
export interface LlmMessage {
|
||||
|
|
@ -29,9 +31,6 @@ export class LlmRequestError extends Error {
|
|||
}
|
||||
}
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
||||
}
|
||||
|
||||
export function parseLlmRequest(value: unknown): ValidatedLlmRequest {
|
||||
if (!isRecord(value)) throw new LlmRequestError('Invalid JSON body')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue