Download config.py from T7yrttrd/Spark.4.5.Text.Image.File.Search.Connectors: direct link, hf CLI and curl.
- Browser
- Download file 6.61 kB
-
https://huggingface.co/spaces/T7yrttrd/Spark.4.5.Text.Image.File.Search.Connectors/resolve/main/config.py
- Command line
-
hf download hf://spaces/T7yrttrd/Spark.4.5.Text.Image.File.Search.Connectors/config.py
-
curl -L -o config.py https://huggingface.co/spaces/T7yrttrd/Spark.4.5.Text.Image.File.Search.Connectors/resolve/main/config.py
6.61 kB
| import os | |
| os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1' | |
| os.environ['OAUTHLIB_RELAX_TOKEN_SCOPE'] = '1' | |
| AI_API_KEY = os.getenv("AI_API_KEY", "") | |
| AI_BASE_URL = os.getenv("AI_BASE_URL", "https://api.b.ai/v1/chat/completions") | |
| AI_MODEL_NAME = os.getenv("AI_MODEL_NAME", "qwen3.8-flash") | |
| TAVILY_API_KEY = os.getenv("TAVILY_API_KEY", "") | |
| REDIRECT_URI = os.getenv("REDIRECT_URI", "https://hongtyyuqu-omni-4-8-text-image-file-search-connectors.hf.space/auth/callback") | |
| SUPABASE_URL = os.getenv("SUPABASE_URL", "https://ycfnaphetzvtxszhkirt.supabase.co") | |
| SUPABASE_KEY = os.getenv("SUPABASE_KEY", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InljZm5hcGhldHp2dHhzemhraXJ0Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODgwODY4NTcsImV4cCI6MjEwMzY2Mjg1N30.L5z8hCS_s4dTi9bb8iGXNVAQLEpMod7aymejk_Za7E8") | |
| TELEGRAM_API_ID = int(os.getenv("TELEGRAM_API_ID", 39246067)) | |
| TELEGRAM_API_HASH = os.getenv("TELEGRAM_API_HASH", "f874c031e6ea5e605d51c17d58c046b0") | |
| OAUTH_CONFIGS = { | |
| "google": { | |
| "client_id": os.getenv("GMAIL_CLIENT_ID", "365289707414-af77dijs63o06l14h9ni40kr1ftojcki.apps.googleusercontent.com"), | |
| "client_secret": os.getenv("GMAIL_CLIENT_SECRET", "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"), | |
| "auth_url": "https://accounts.google.com/o/oauth2/auth", | |
| "token_url": "https://oauth2.googleapis.com/token", | |
| "scope": "https://mail.google.com/ https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile" | |
| }, | |
| "gmail": { | |
| "client_id": os.getenv("GMAIL_CLIENT_ID", "365289707414-af77dijs63o06l14h9ni40kr1ftojcki.apps.googleusercontent.com"), | |
| "client_secret": os.getenv("GMAIL_CLIENT_SECRET", "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"), | |
| "auth_url": "https://accounts.google.com/o/oauth2/auth", | |
| "token_url": "https://oauth2.googleapis.com/token", | |
| "scope": "https://mail.google.com/ https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile" | |
| }, | |
| "calendar": { | |
| "client_id": os.getenv("CALENDAR_CLIENT_ID", "365289707414-2bdip1nbo27k221k1og7ua2bpbecattt.apps.googleusercontent.com"), | |
| "client_secret": os.getenv("CALENDAR_CLIENT_SECRET", "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"), | |
| "auth_url": "https://accounts.google.com/o/oauth2/auth", | |
| "token_url": "https://oauth2.googleapis.com/token", | |
| "scope": "https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/admin.directory.resource.calendar https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile" | |
| }, | |
| "drive": { | |
| "client_id": os.getenv("DRIVE_CLIENT_ID", "365289707414-u43unl7e8u4f8bmcrcc4hgrq084plfr0.apps.googleusercontent.com"), | |
| "client_secret": os.getenv("DRIVE_CLIENT_SECRET", "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"), | |
| "auth_url": "https://accounts.google.com/o/oauth2/auth", | |
| "token_url": "https://oauth2.googleapis.com/token", | |
| "scope": "https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile" | |
| }, | |
| "sheets": { | |
| "client_id": os.getenv("SHEETS_CLIENT_ID", "365289707414-89s1qdes2ililrjclp5e4g6rf5ftrlrd.apps.googleusercontent.com"), | |
| "client_secret": os.getenv("SHEETS_CLIENT_SECRET", "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"), | |
| "auth_url": "https://accounts.google.com/o/oauth2/auth", | |
| "token_url": "https://oauth2.googleapis.com/token", | |
| "scope": "https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile" | |
| }, | |
| "docs": { | |
| "client_id": os.getenv("DOCS_CLIENT_ID", "365289707414-6qs3h6q6fig1pmc85dkg8brlgr1iqp99.apps.googleusercontent.com"), | |
| "client_secret": os.getenv("DOCS_CLIENT_SECRET", "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"), | |
| "auth_url": "https://accounts.google.com/o/oauth2/auth", | |
| "token_url": "https://oauth2.googleapis.com/token", | |
| "scope": "https://www.googleapis.com/auth/documents https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile" | |
| }, | |
| "slides": { | |
| "client_id": os.getenv("SLIDES_CLIENT_ID", "365289707414-ht2ntleppc4k9l1ofr27jj8o8p5nmiba.apps.googleusercontent.com"), | |
| "client_secret": os.getenv("SLIDES_CLIENT_SECRET", "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"), | |
| "auth_url": "https://accounts.google.com/o/oauth2/auth", | |
| "token_url": "https://oauth2.googleapis.com/token", | |
| "scope": "https://www.googleapis.com/auth/presentations https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile" | |
| }, | |
| "youtube": { | |
| "client_id": os.getenv("YOUTUBE_CLIENT_ID", "365289707414-em2ifjs3d2hqssrbcsgonckd4mvg4e9t.apps.googleusercontent.com"), | |
| "client_secret": os.getenv("YOUTUBE_CLIENT_SECRET", "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"), | |
| "auth_url": "https://accounts.google.com/o/oauth2/auth", | |
| "token_url": "https://oauth2.googleapis.com/token", | |
| "scope": "https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile" | |
| }, | |
| "notion": { | |
| "client_id": os.getenv("NOTION_CLIENT_ID", "3b8d872b-594c-81b8-b5a3-003798f224bc"), | |
| "client_secret": os.getenv("NOTION_CLIENT_SECRET", "secret_loaJl6Euy6rYx6cHkJUIZhFKCD9nUO0KlQMleECWFME"), | |
| "auth_url": "https://api.notion.com/v1/oauth/authorize", | |
| "token_url": "https://api.notion.com/v1/oauth/token", | |
| "extra_params": {"owner": "user", "response_type": "code"} | |
| }, | |
| "github": { | |
| "client_id": os.getenv("GITHUB_CLIENT_ID", "Ov23li5J8HZnM80qoKUm"), | |
| "client_secret": os.getenv("GITHUB_CLIENT_SECRET", "ec8548ef297ed59d8372e5bc549d8ed9adc996f7"), | |
| "auth_url": "https://github.com/login/oauth/authorize", | |
| "token_url": "https://github.com/login/oauth/access_token", | |
| "scope": "repo workflow gist read:org write:org admin:org read:user user:email delete_repo project admin:repo_hook" | |
| }, | |
| "vercel": { | |
| "client_id": os.getenv("VERCEL_CLIENT_ID", "oac_33MEL4YmWdKrbDsBPdhcQTEB"), | |
| "client_secret": os.getenv("VERCEL_CLIENT_SECRET", "p8gKe3qx6fGFfxl6Hs89KwEj"), | |
| "auth_url": "https://vercel.com/integrations/my-ai-bot-connect/new", | |
| "token_url": "https://api.vercel.com/v2/oauth/access_token" | |
| } | |
| } | |
| user_tokens = {} | |