# # SPDX-FileCopyrightText: Hadad # SPDX-License-Identifier: Apache-2.0 # import os ENDPOINT = os.getenv("OPENAI_API_BASE_URL") # /v1/chat/completions API_KEY = os.getenv("OPENAI_API_KEY") MODEL = "openai/gpt-4o-mini" STREAM = True RETRY = 10 # max retries for api request # See the endpoint list at https://searx.space # Public instances do not support JSON. # You will need to modify the main logic to use HTML instead. # Please refer to the SearchGPT 1.0 version for guidance. # https://huggingface.co/spaces/umint/searchgpt/blob/0ceb431c97449f214fe952ca356d6f79f0d10983/src/engine/browser_engine.py#L34 SEARXNG = "https://umint-searxng.hf.space/search" FORMAT = "json" # Do not use this when using public instances (doesn't support). See src/tools/workflows/web_search.py#21 READER = "https://r.jina.ai/" TIMEOUT = 60 # 1 minute | for tools AIOHTTP = { "use_dns_cache": True, "ttl_dns_cache": 300, "limit": 100, "limit_per_host": 30, "enable_cleanup_closed": True } HEADERS = { "User-Agent": ( "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " "(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" ), "Accept": ( "text/html,application/xhtml+xml,application/xml;q=0.9," "application/json,image/*,*/*;q=0.8" ), "Accept-Encoding": "gzip, deflate, br", "DNT": "1", "Upgrade-Insecure-Requests": "1", "Cache-Control": "no-cache, no-store, no-transform, must-revalidate, private", "Pragma": "no-cache", "Sec-Fetch-Dest": "document", "Sec-Fetch-Mode": "navigate", "Sec-Fetch-Site": "cross-site", "Sec-Fetch-User": "?1" } REMINDERS = """ 1. Collect all URLs, hyperlinks, references, and citations mentioned in the content. 2. Include all the source references or source links or source URLs using HTML format: `source_name_title_or_article`. """ DESCRIPTION = """

Hi there,

Welcome to SearchGPT V3!


Faster, smarter, and built for a seamless search experience.


Enjoy private and tracker free searching powered by SearXNG and GPT-4o Mini.


This is a dedicated version separate from the main spaces and designed specifically for public use.


Interested in exploring the limited models available in the main spaces?


Click here to discover them now!


Like this project? Feel free to buy me a coffee.

""" # Gradio