0.1.7 • Published 5 months ago
genkit-huggingface v0.1.7
Built by Acies Crest ❤️
Hugging Face Genkit Plugin
This plugin integrates Hugging Face's Inference API into Genkit, allowing you to leverage Hugging Face models within the Genkit ecosystem.
Installation
To install the library, use npm:
npm install genkit-huggingface
Usage
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);
License
This project is licensed under the MIT License.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Contact
For any questions or issues, please open an issue on this repository.