Generate text completions using HuggingFace's API
Source:R/service-huggingface.R
create_completion_huggingface.Rd
Generate text completions using HuggingFace's API
Usage
create_completion_huggingface(
prompt,
history = NULL,
model = "tiiuae/falcon-7b-instruct",
token = Sys.getenv("HF_API_KEY"),
max_new_tokens = 250
)
Arguments
- prompt
The prompt for generating completions
- history
A list of the previous chat responses
- model
The model to use for generating text
- token
The API key for accessing HuggingFace's API. By default, the function will try to use the
HF_API_KEY
environment variable.- max_new_tokens
Maximum number of tokens to generate, defaults to 250