-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To unify text_generation()
's stop_sequences
and TextGenerationInput
's stop
params
#2471
Comments
Currently I should do this as the alternative: from dataclasses import asdict
input_as_dict = asdict(input)
input_as_dict["parameters"]["stop_sequences"] = input_as_dict["parameters"]["stop"]
del input_as_dict["parameters"]["stop"]
client.text_generation(input.inputs, **input_as_dict["parameters"]) |
Hi @sadra-barikbin, yes I definitely agree this parameter should be unified. I opened a PR to fix it :) #2473 |
Thanks @Wauplin ! 👍 |
There's also a discrepancy between huggingface_hub/src/huggingface_hub/inference/_generated/types/chat_completion.py Line 123 in 359093f
|
Thanks for flagging this @sadra-barikbin. It's a slight discrepancy but it allows us to simplify the |
Hi there! 🤗
It would be great if
text_generation()
'sstop_sequences
andTextGenerationInput
'sstop
params are unified just likechat_completion
andChatCompletionInput
to be able to feed the input dataclasses to the client methods directly:huggingface_hub/src/huggingface_hub/inference/_client.py
Line 1658 in 359093f
The text was updated successfully, but these errors were encountered: