Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt

Use this file to discover all available pages before exploring further.

1. Get an API Key

Open the Anyfast console and sign up (or log in if you already have an account). After signing up, go to API Keys, create a new API Key, and copy it for later use.

2. Deploy MindSearch

Clone MindSearch and install dependencies (see the MindSearch README). Edit /path/to/MindSearch/mindsearch/models.py and add the Anyfast API configuration:
anyfast_config = dict(
    type=GPTAPI,
    model_type='gpt-4o',
    key=os.environ.get('ANYFAST_API_KEY', 'YOUR ANYFAST API KEY'),
    openai_api_base='https://www.anyfast.ai/v1/chat/completions',
    meta_template=[
        dict(role='system', api_role='system'),
        dict(role='user', api_role='user'),
        dict(role='assistant', api_role='assistant'),
        dict(role='environment', api_role='system')
    ],
    top_p=0.8,
    top_k=1,
    temperature=0,
    max_new_tokens=8192,
    repetition_penalty=1.02,
    stop_words=['<|im_end|>']
)
Start the backend:
# Set your Anyfast API Key
export ANYFAST_API_KEY=<your-api-key>

# Start MindSearch
python -m mindsearch.app --lang en --model_format anyfast_config --search_engine DuckDuckGoSearch
Start the frontend (Gradio example):
python frontend/mindsearch_gradio.py

3. Deploy to HuggingFace Space

You can also deploy to HuggingFace Spaces:
  • Create a new Space at huggingface.co/new-space with Gradio template and Blank configuration.
  • Go to Settings and add your Anyfast API Key as a secret.
  • Upload the MindSearch directory, requirements.txt, and an app.py file.
For a complete example, refer to the MindSearch + Anyfast HuggingFace Space.