Skip to content

Commit

Permalink
add tests for anthropic
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsayo committed Feb 13, 2025
1 parent 7c8c069 commit 41f0854
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/plugin-anthropic/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,34 @@ export const anthropicPlugin: Plugin = {
return text;
}
},
tests: [
{
name: "anthropic_plugin_tests",
tests: [
{
name: 'test_text_large',
fn: async (runtime) => {
const { text } = await runtime.generateText({
model: runtime.models[ModelClass.TEXT_SMALL],
prompt: "What is the nature of reality?",
});
console.log(text, ModelClass.TEXT_SMALL);
}
},
{
name: 'test_text_large',
fn: async (runtime) => {
const { text } = await runtime.generateText({
model: runtime.models[ModelClass.TEXT_LARGE],
prompt: "What is the nature of reality in 10 words?",
});
console.log(text, ModelClass.TEXT_LARGE);
}
}
]
}
]

};

export default anthropicPlugin;

0 comments on commit 41f0854

Please sign in to comment.