# servers/retriever/parameter.yaml

model_name_or_path: openbmb/MiniCPM-Embedding-Light
corpus_path: data/corpus_example.jsonl
embedding_path: embedding/embedding.npy
collection_name: wiki

backend: sentence_transformers # options: infinity, sentence_transformers, openai, bm25
backend_configs:
  infinity:
    bettertransformer: false
    pooling_method: auto
    model_warmup: false
    trust_remote_code: true
  sentence_transformers:
    trust_remote_code: true
    sentence_transformers_encode:
      normalize_embeddings: false
      encode_chunk_size: 256
      q_prompt_name: query
      psg_prompt_name: document
      psg_task: null
      q_task: null
  openai:
    model_name: text-embedding-3-small
    base_url: "https://api.openai.com/v1"
    api_key: "abc"
    concurrency: 8
  bm25:
    lang: en # set to zh for Chinese corpora/query
    tokenizer: auto # options: auto, default, jieba, character; auto uses jieba for Chinese
    save_path: index/bm25

index_backend: faiss # options: faiss, milvus
index_backend_configs:
  faiss:
    index_use_gpu: True
    index_chunk_size: 10000
    index_path: index/index.index
  milvus:
    uri: index/milvus_demo.db # Milvus Lite local file (or http://localhost:19530 for server)
    token: null
    id_field_name: id
    vector_field_name: vector
    text_field_name: contents
    id_max_length: 64
    text_max_length: 60000
    metric_type: IP
    index_params:
      index_type: AUTOINDEX
      metric_type: IP
    search_params:
      metric_type: IP
      params: {}
    index_chunk_size: 1000

websearch_backend: tavily # options: tavily, exa, zhipuai
websearch_backend_configs:
  exa:
    api_key: ""
    retries: 3
    base_delay: 1.0
    search_kwargs: {}
  tavily:
    api_key: ""
    retries: 3
    base_delay: 1.0
    search_kwargs: {}
  zhipuai:
    api_key: ""
    base_url: "https://open.bigmodel.cn/api/paas/v4/web_search"
    search_engine: "search_std"
    search_intent: false
    search_recency_filter: "noLimit"
    content_size: "medium"
    retries: 3
    base_delay: 1.0
    search_kwargs: {}

batch_size: 16
top_k: 5
gpu_ids: "1"
query_instruction: ""
is_multimodal: false
overwrite: false
retrieve_thread_num: 1
retriever_url: "http://127.0.0.1:64501"
is_demo: false
