diff --git a/packages/example/src/basics.eval.ts b/packages/example/src/basics.eval.ts index e81614e..518e289 100644 --- a/packages/example/src/basics.eval.ts +++ b/packages/example/src/basics.eval.ts @@ -3,7 +3,7 @@ import { generateText } from "ai"; import { evalite, Levenshtein } from "evalite"; import { createStorage } from "unstorage"; import fsDriver from "unstorage/drivers/fs"; -import { cacheLanguageModel } from "./cacheLanguageModel.js"; +import { cacheModel } from "./cache-model.js"; const storage = createStorage({ driver: (fsDriver as any)({ @@ -36,7 +36,7 @@ evalite("Test basics", { ], task: async (input) => { const result = await generateText({ - model: cacheLanguageModel(openai("gpt-3.5-turbo"), storage), + model: cacheModel(openai("gpt-3.5-turbo"), storage), system: ` Answer the question concisely, in as few words as possible. `, diff --git a/packages/example/src/cacheLanguageModel.ts b/packages/example/src/cache-model.ts similarity index 92% rename from packages/example/src/cacheLanguageModel.ts rename to packages/example/src/cache-model.ts index c97a9b2..5189e18 100644 --- a/packages/example/src/cacheLanguageModel.ts +++ b/packages/example/src/cache-model.ts @@ -19,10 +19,7 @@ const createResultFromCachedObject = ( return obj as any; }; -export const cacheLanguageModel = ( - model: LanguageModelV1, - storage: Storage -) => { +export const cacheModel = (model: LanguageModelV1, storage: Storage) => { return experimental_wrapLanguageModel({ model, middleware: {