(args: {
requestId: string
activity: GenerationMiddlewareContext['activity']
provider: string
model: string
modelOptions?: unknown
createId: (prefix: string) => string
})
| 14 | * so `source` is fixed to `'server'` and `context` to `undefined`. |
| 15 | */ |
| 16 | export function createGenerationContext(args: { |
| 17 | requestId: string |
| 18 | activity: GenerationMiddlewareContext['activity'] |
| 19 | provider: string |
| 20 | model: string |
| 21 | modelOptions?: unknown |
| 22 | createId: (prefix: string) => string |
| 23 | }): GenerationMiddlewareContext { |
| 24 | return { |
| 25 | requestId: args.requestId, |
| 26 | activity: args.activity, |
| 27 | provider: args.provider, |
| 28 | model: args.model, |
| 29 | modelOptions: args.modelOptions, |
| 30 | source: 'server', |
| 31 | createId: args.createId, |
| 32 | context: undefined, |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * Run a single lifecycle hook across each middleware in registration order, |
no outgoing calls
no test coverage detected