this PR fixes a small bug when getting the task snippets to generate the inference API docs in hub-docs/scripts/api-inference/scripts/generate.ts. when generating the documentation with the latest version of huggingface/tasks, I got the following error:
if (model.tags.includes("conversational")) {
^
TypeError: Cannot read properties of undefined (reading 'includes')
Changes made:
added optional chaining operator to the model.tags check in the snippets.
this PR fixes a small bug when getting the task snippets to generate the inference API docs in hub-docs/scripts/api-inference/scripts/generate.ts. when generating the documentation with the latest version of
huggingface/tasks
, I got the following error:Changes made:
model.tags
check in the snippets.