Hugging Face
ShanoneのHugging Face連携では、Hubのほぼ全機能——モデル、データセット、Spaces、サーバーレス推論、推論エンドポイント、コレクション、議論/PR、論文、リポジトリ操作、セキュリティスキャン、Webhookを扱う87のツールをエージェントが利用できるようになります。はじめに
1
Hugging Face アクセストークンを取得する
Hugging FaceアカウントのSettings → Access Tokensからトークンを生成します。
2
Shanoneに登録する
ShanoneダッシュボードのIntegrationsを開き、Hugging Faceを選択してアクセストークンを貼り付けます。
3
リクエストを再試行する
保存が完了すると、
huggingface_*ツールへのshanone_execute_tool呼び出しが成功するようになります。利用可能なツール
ShanoneはHugging Face用に87のツールを提供しており、以下のカテゴリに分類されています。モデル
モデル
huggingface_list_models, huggingface_get_model_info, huggingface_list_user_models, huggingface_create_model_repo, huggingface_delete_model_repo, huggingface_update_model_settingsデータセット
データセット
huggingface_list_datasets, huggingface_get_dataset_info, huggingface_create_dataset_repo, huggingface_delete_dataset_repo, huggingface_get_dataset_rows, huggingface_filter_dataset_rows, huggingface_search_dataset, huggingface_get_dataset_statistics, huggingface_get_dataset_splits, huggingface_get_dataset_size, huggingface_list_parquet_filesSpaces
Spaces
huggingface_list_spaces, huggingface_get_space_info, huggingface_create_space_repo, huggingface_delete_space_repo, huggingface_restart_space, huggingface_pause_space推論
推論
huggingface_text_generation, huggingface_text_classification, huggingface_feature_extraction, huggingface_chat_completion, huggingface_image_classification, huggingface_summarization, huggingface_text_to_image, huggingface_image_to_text, huggingface_translation, huggingface_question_answering, huggingface_zero_shot_classification, huggingface_token_classification, huggingface_fill_mask, huggingface_automatic_speech_recognition推論エンドポイント
推論エンドポイント
huggingface_list_inference_endpoints, huggingface_get_inference_endpoint, huggingface_create_inference_endpoint, huggingface_update_inference_endpoint, huggingface_delete_inference_endpoint, huggingface_pause_inference_endpoint, huggingface_resume_inference_endpoint, huggingface_scale_inference_endpointリポジトリ操作
リポジトリ操作
huggingface_create_branch, huggingface_delete_branch, huggingface_create_tag, huggingface_delete_tag, huggingface_list_repo_refs, huggingface_list_commits, huggingface_list_repo_filesコレクション
コレクション
huggingface_create_collection, huggingface_list_collections, huggingface_get_collection, huggingface_add_to_collection, huggingface_remove_from_collection, huggingface_delete_collection議論 & プルリクエスト
議論 & プルリクエスト
huggingface_create_discussion, huggingface_list_discussions, huggingface_get_discussion, huggingface_create_discussion_comment, huggingface_change_discussion_status, huggingface_merge_pull_request論文
論文
huggingface_search_papers, huggingface_get_daily_papers, huggingface_get_paper, huggingface_list_paper_comments, huggingface_create_paper_commentセキュリティ & アクセス申請
セキュリティ & アクセス申請
huggingface_get_security_scan, huggingface_request_repo_access, huggingface_list_access_requests, huggingface_handle_access_request組織 & ユーザー
組織 & ユーザー
huggingface_get_organization, huggingface_list_organization_members, huggingface_get_organization_repos, huggingface_get_user_infoWebhook & 利用状況
Webhook & 利用状況
huggingface_create_webhook, huggingface_list_webhooks, huggingface_get_webhook, huggingface_update_webhook, huggingface_enable_webhook, huggingface_disable_webhook, huggingface_delete_webhook, huggingface_get_billing_usage, huggingface_get_compute_usage, huggingface_get_storage_usageよくある使い方
モデル/データセットの調査
タスクやタグでモデル・データセットを検索し、用途に最も適したものを要約する
サーバーレス推論
自前のモデルをホストせずにテキスト生成・分類・画像タスクを直接実行する
エンドポイントのライフサイクル管理
専用の推論エンドポイントを立ち上げ、スケールし、アイドル時は一時停止してコストを抑える
リポジトリメンテナンス
ブランチ/タグを管理し、議論やPRをレビューし、マージ前にセキュリティスキャン結果を確認する
トラブルシューティング
huggingface_text_generationなど推論呼び出しが503を返す
huggingface_text_generationなど推論呼び出しが503を返す
サーバーレス推論APIのモデルはコールドスタート状態でロードが必要な場合があります——少し待ってから再試行するか、頻繁に呼び出すモデルには
huggingface_create_inference_endpointを使ってコールドスタートを完全に回避してください。大きなデータセットでhuggingface_get_dataset_rowsが遅い、またはタイムアウトする
大きなデータセットでhuggingface_get_dataset_rowsが遅い、またはタイムアウトする
行単位で大きなデータセット全体をページングするより、具体的な条件を指定した
huggingface_filter_dataset_rows、またはhuggingface_list_parquet_filesと独自処理の組み合わせを優先してください。huggingface_create_model_repoやデータセット/Space版で権限エラーが発生する
huggingface_create_model_repoやデータセット/Space版で権限エラーが発生する
組織のネームスペース下でリポジトリを作成するには、トークンのアカウントがその組織の書き込み権限を持つメンバーである必要があります——
huggingface_list_organization_membersで確認するか、代わりに個人のネームスペース下で作成してください。