You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hfapigo calls to fill_mask endpoints do not support multi-input, multi-mask arguments. Supported arguments are multi-input or multi-mask, but not both at the same time.
To be clear, some HuggingFace models do support these calls, but this library does not.
For example, the following calls are supported by this library.
// Supportedhfapigo.SendFillMaskRequest(hfapigo.RecommendedFillMaskModel, &hfapigo.FillMaskRequest{
Inputs: [
"The answer to life, the universe, and everything is [MASK].",
],
})
// Supported
hfapigo.SendFillMaskRequest(hfapigo.RecommendedFillMaskModel, &hfapigo.FillMaskRequest{
Inputs: [
"The answer to life, the universe, and everything is [MASK].",
"So long, and thanks for all the [MASK].",
],
})
// Supportedhfapigo.SendFillMaskRequest(hfapigo.RecommendedFillMaskModel, &hfapigo.FillMaskRequest{
Inputs: [
"The answer to life, the [MASK], and everything is [MASK].",
],
})
And the following calls are not supported by this library.
// NOT Supportedhfapigo.SendFillMaskRequest(hfapigo.RecommendedFillMaskModel, &hfapigo.FillMaskRequest{
Inputs: [
"The answer to life, the [MASK], and everything is [MASK].",
"So [MASK] and thanks for all the [MASK]",
],
})
// NOT Supportedhfapigo.SendFillMaskRequest(hfapigo.RecommendedFillMaskModel, &hfapigo.FillMaskRequest{
Inputs: [
"The answer to life, the [MASK], and everything is [MASK].",
"The answer to life, the [MASK], and everything is 42.",
],
})
The reason these types of calls are not supported is that it quickly becomes non-trivial to deduce the structure of the response. I'm sure it is possible, but I don't foresee myself having time to work on this in the near future.
Workaround
If you need to make a call of this type to the API, you can build your FillMaskRequest and manually make the call to MakeHFAPIRequest, which will give you the appropriate JSON response. From there it is up to you to deduce the structure of the returned JSON and unmarshal it.
The text was updated successfully, but these errors were encountered:
The Issue
hfapigo
calls tofill_mask
endpoints do not support multi-input, multi-mask arguments. Supported arguments are multi-input or multi-mask, but not both at the same time.To be clear, some HuggingFace models do support these calls, but this library does not.
For example, the following calls are supported by this library.
And the following calls are not supported by this library.
The reason these types of calls are not supported is that it quickly becomes non-trivial to deduce the structure of the response. I'm sure it is possible, but I don't foresee myself having time to work on this in the near future.
Workaround
If you need to make a call of this type to the API, you can build your
FillMaskRequest
and manually make the call toMakeHFAPIRequest
, which will give you the appropriate JSON response. From there it is up to you to deduce the structure of the returned JSON and unmarshal it.The text was updated successfully, but these errors were encountered: