Built by Acies Crest ❤️
This plugin integrates Hugging Face's Inference API into Genkit, allowing you to leverage Hugging Face models within the Genkit ecosystem.
To install the library, use npm:
npm install genkit-huggingface
Here is a simple example of how to use the genkit-huggingface
library in your project:
import { genkit } from 'genkit';
import { huggingface } from 'genkit-huggingface';
const ai = genkit({
plugins: [
huggingface({
apiKey: process.env.HUGGING_FACE_API_KEY,
defaultModel: 'Qwen/Qwen2.5-Coder-32B-Instruct' // Or any other Hugging Face model name
})
]
});
// Use the model
const response = await ai.generate({ model: 'huggingface-model', prompt: "Hello, how are you?" });
console.log(response);
This project is licensed under the MIT License.
Contributions are welcome! Please open an issue or submit a pull request.
For any questions or issues, please open an issue on this repository.