Grounded Text Generation
A 3-step recipe with Hugging Face. We can help you get access.
Recipe · 3 steps
Grounded Text Generation
with Hugging Face · Artificial Intelligence Management
Discover a text-generation model on the Hub and generate text with it.
- Search the Hub for text-generation models matching the query, sorted by downloads, and take the most popular match.
- Confirm the selected model exists and read its tags before issuing a paid inference request.
- Run a hosted text-generation inference request against the confirmed model. A 200 returns the generated text; a 503 indicates the model is still loading and the request may be retried.
What you'll need to have ready
- hfToken: Hugging Face access token used as a Bearer credential.
- search: Full-text search query for finding a model on the Hub.
- prompt: The input text prompt to generate from.
- maxNewTokens: Maximum number of new tokens to generate.
- temperature: Sampling temperature.
For your developer
Arazzo workflow hugging-face:grounded-text-generation, 3 operations: $sourceDescriptions.infoApi.listModels → $sourceDescriptions.modelsApi.getModel → $sourceDescriptions.naturalLanguageProcessingApi.textGeneration. Specs on APIs.io.