Close menu
Explore Plans
Mobile menu Close menu
Hugging Face

Run text generation

Pro plus icon Generate text from a Hugging Face language model in response to your prompt.

Developer info

API endpoint slug
hugging_face.run_text_generation
Runtime method
performQuery("hugging_face.run_text_generation"}

Query fields

Model Text input > Other

Label
Model
Helper text
The Hugging Face model ID of a conversational model, e.g. mistralai/Mistral-7B-Instruct-v0.2. Requires Inference Providers access on your account.
Slug
model_id
Required
true
Can have default value
true

Prompt Text input

Label
Prompt
Helper text
The prompt to send to the model.
Slug
prompt
Required
true
Can have default value
true

Max new tokens Text input > Other

Label
Max new tokens
Helper text
Maximum number of tokens to generate. Defaults to 200.
Slug
max_new_tokens
Required
false
Can have default value
true

Ingredients

Generated text The text generated by the model.

Slug
generated_text
Filter code
HuggingFace.runTextGeneration.GeneratedText
Type
String
Example
The capital of France is Paris.

Model The model that produced the response.

Slug
model_id
Filter code
HuggingFace.runTextGeneration.ModelId
Type
String
Example
mistralai/Mistral-7B-Instruct-v0.2

Prompt used The prompt that was sent to the model.

Slug
prompt_used
Filter code
HuggingFace.runTextGeneration.PromptUsed
Type
String
Example
What is the capital of France?