provider-factory.ts 335 B

123456789
  1. export function createFixtureProvider(options: Record<string, unknown>) {
  2. const captured = Object.fromEntries(Object.entries(options))
  3. return Object.assign((modelID: string) => ({ modelID, options: captured }), {
  4. options: captured,
  5. languageModel(modelID: string) {
  6. return { modelID, options: captured }
  7. },
  8. })
  9. }