Basic examples of how to the the functions in ModelFusion.
- Create .env file with the following content (and more settings, depending on the providers you want to use):
OPENAI_API_KEY="YOUR_OPENAI_API_KEY"
COHERE_API_KEY="YOUR_COHERE_API_KEY"
HUGGINGFACE_API_KEY="YOUR_HUGGINGFACE_API_KEY"
...- Run the following commands from the root directory of the modelfusion repo:
pnpm install
pnpm build- Run any example:
pnpm tsx examples/basic/src/path/to/example.ts