Implementation:Infiniflow Ragflow SearchService Update LLM Config
Appearance
| Knowledge Sources | |
|---|---|
| Domains | RAG, Search |
| Last Updated | 2026-02-12 06:00 GMT |
Overview
Concrete tool for configuring LLM model and generation parameters for search answer synthesis provided by RAGFlow SearchService.
Description
Uses the same POST /search/update endpoint with search_config.chat_id (LLM model) and search_config.llm_setting (generation parameters). The frontend validates with a Zod schema.
Usage
Called via the search settings form in the frontend.
Code Reference
Source Location
- Repository: ragflow
- File: api/apps/search_app.py (L64-118), web/src/pages/next-search/search-setting.tsx (L65-103)
Signature
# Same endpoint as Search Configuration
# search_config.chat_id = LLM model ID
# search_config.llm_setting = {temperature, top_p, frequency_penalty, presence_penalty}
Import
from api.db.services.search_service import SearchService
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| search_config.chat_id | str | No | LLM model ID |
| search_config.llm_setting | dict | No | Generation parameters |
Outputs
| Name | Type | Description |
|---|---|---|
| search_app | dict | Updated search application |
Usage Examples
import requests
url = "http://localhost:9380/search/update"
payload = {
"search_id": "search-uuid-123",
"name": "Product Search",
"search_config": {
"chat_id": "gpt-4-turbo",
"llm_setting": {
"temperature": 0.3,
"top_p": 0.9
}
}
}
requests.post(url, json=payload, headers=headers)
Related Pages
Implements Principle
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment