Commit Graph

7453 Commits

Author SHA1 Message Date
Jack
10c00a9614 Feat: add built in DSL file API (#17003)
### Summary

1. list and get by id API for builtin DSL
2. add DSL default component param values validation
3. remove all hard code keys for parser config
2026-07-18 11:00:08 +08:00
zcxGGmu
1c0432a816 Fix centered PDF title reading order (#17009) 2026-07-18 01:31:27 +08:00
deadtrickster
982b9c7b25 fix(deepdoc): recover word boundaries for non-Latin scripts; skip OCR fallback the recogniser can't serve (#16958) 2026-07-18 00:36:25 +08:00
Jin Hai
8ebdc02cf6 Go: add LLM usage (#17049)
### Summary

```
RAGFlow(api/default)> CHAT WITH 'glm-4-flash@new_test@zhipu-ai' MESSAGE '30 words describes LLM';
Answer: Hello! I'm ChatGLM, an AI assistant. Feel free to ask me any questions or request help with any tasks.
Input tokens: 5
Output tokens: 28
Time: 12.748241
```

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-17 21:28:43 +08:00
Wang Qi
c420de0dc5 Security fix: CVE-2025-21521 (#17046) 2026-07-17 19:35:20 +08:00
maoyifeng
6cc30bcd91 CI: modify testcase to p3 (#17047)
### Summary

CI: modify longtime testcase to p3
2026-07-17 19:24:32 +08:00
euvre
7ec2e9171b fix(web): add missing provider homepage links in Available models panel (#17040) 2026-07-17 17:36:15 +08:00
euvre
6da5085073 feat: add chat-level TTS and ASR endpoints for Go API server (#17036) 2026-07-17 17:22:57 +08:00
Wang Qi
6a1224ba04 Fix table parse: combined column (#17039) 2026-07-17 16:58:54 +08:00
Haruko386
344477f3f0 fix: loop component usage issue (#17028)
### Summary

As title

<img width="3718" height="2029" alt="image"
src="https://github.com/user-attachments/assets/227bcd8b-e5b8-465e-983c-c0c0650a4ea5"
/>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-07-17 16:40:42 +08:00
Lynn
b6ee6c3116 Fix: sample_rate in siliconflow tts model call (#17043) 2026-07-17 16:29:57 +08:00
Haruko386
ddd7fc02ee feat: support yahoo_finance search (#17022)
### Summary

As title

<img width="3116" height="1949" alt="image"
src="https://github.com/user-attachments/assets/13692cb2-06d6-470b-b13e-182773c8225a"
/>
2026-07-17 16:05:19 +08:00
Hz_
e55bc969f9 fix(go-agent): filter SSE done sentinel from model stream (#17034)
## Summary

- Filter the `[DONE]` transport sentinel from Eino model streams
- Add regression coverage for stream messages and callbacks

## Testing

- `bash build.sh --test ./internal/entity/models`
- `bash build.sh --test ./internal/agent/component`
- `bash build.sh --test -run
'Test(AgentChatCompletions_Stream|RunAgent_Stream)' ./internal/handler`
2026-07-17 15:55:00 +08:00
Hz_
1b77e3ebcd fix(go-agent): preserve canvas system state across turns (#17010)
## Summary

- Preserve request-scoped system variables such as files and user IDs
during Canvas execution.
- Persist conversation history, turn counts, and tool memory in the
session DSL across turns.
- Parse agent uploads into `sys.files` and align system variable
rendering with Python.

## Testing

- `bash build.sh --test ./internal/agent/...`
- `bash build.sh --test ./internal/service/...`

<img width="1896" height="1232" alt="image"
src="https://github.com/user-attachments/assets/b420cd97-53c3-470f-a3e1-d39cea26a213"
/>
2026-07-17 15:53:58 +08:00
Lynn
7336c27814 Fix: set Builtin models as default model (#17029) 2026-07-17 15:53:45 +08:00
Wang Qi
bee524892d Doc: fix doc (#17033) 2026-07-17 15:08:09 +08:00
qinling0210
995e405e8c Support pipeline DSL modification through dataset configuration (backend) (#16991)
…end)

### Summary

Support pipeline DSL modification through dataset configuration
(backend)

Key modification: knowledgebase.parser_config

---------

Co-authored-by: yzc <yuzhichang@gmail.com>
2026-07-17 14:40:09 +08:00
buua436
b32d5fd86b fix: render readable wiki artifact links (#17011) 2026-07-17 14:28:20 +08:00
chanx
c5cf9b473d fix(model-provider): replace per-card auto-save with batch Save-all (#17025) 2026-07-17 14:26:49 +08:00
Wang Qi
6b3a350a57 Fix cv model siliconflow and zhipu cannot describe video, capture 3 images from video and sent to llm (#852) (#17007) 2026-07-17 14:25:22 +08:00
Jin Hai
cf71c7193a Go: update server config (#17027)
### Summary

```
RAGFlow(admin)> list services;
+--------+--------------+----+---------------------+------+---------------+-----------+
| enable | host         | id | name                | port | service_type  | status    |
+--------+--------------+----+---------------------+------+---------------+-----------+
|        | localhost    | 0  | redis               | 6379 | cache         | alive     |
|        | localhost    | 1  | minio               | 9000 | file_store    | alive     |
|        | localhost    | 2  | elasticsearch       | 1200 | retrieval     | alive     |
|        | localhost    | 3  | mysql               | 3306 | meta_data     | alive     |
| false  | localhost    | 4  | jaeger              | 4318 | tracing       | unknown   |
|        | localhost    | 5  | clickhouse          | 9900 | olap          | unknown   |
|        | localhost    | 6  | nats                | 4222 | message_queue | CONNECTED |
|        | 192.168.1.68 | 7  | ragflow-server-9384 | 9384 | api_server    | alive     |
+--------+--------------+----+---------------------+------+---------------+-----------+

```

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-17 13:54:19 +08:00
buua436
27d091b5b6 fix: make await response wait for user input (#16995)
### What problem does this PR solve?

Await Response incorrectly consumed the initial `sys.query` as its
input, so the first user interaction was skipped.

This change makes Await Response wait for actual user input while
preserving the existing initial-query behavior for the Begin node.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2026-07-17 13:12:42 +08:00
euvre
d0ac79dc96 fix: ASR/VLM/TTS models not selectable in default model settings (#17024) 2026-07-17 13:05:22 +08:00
balibabu
677960716e Feat: Enable the wiki's Markdown editor to navigate to a new Markdown file when a link is clicked. (#17019) 2026-07-17 11:22:18 +08:00
Zhichang Yu
f69ed74670 fix lefthook (#17023) dev-20260717 2026-07-17 11:18:10 +08:00
Jin Hai
7c698f8e4b Python: remove unused index (#17008)
### Summary

Remove below indexes.
```
idx_tenant_langfuse_secret_key
idx_tenant_langfuse_public_key
idx_tenant_langfuse_host
```

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-16 23:00:44 +08:00
balibabu
548f296ead Feat: Visualize session graph data using ArtifactForceGraph. (#16977)
### Summary

Feat: Visualize session graph data using ArtifactForceGraph.
2026-07-16 20:54:58 +08:00
euvre
c599dc6c52 fix: remove dangling MetaFields reference and skip affected Go backend tests (#16983) 2026-07-16 20:20:29 +08:00
Kevin Hu
d5d04ad639 Feat: compilation result navigation in agentic search (#17002)
### Summary

Compilation result navigation in agentic search.
2026-07-16 20:19:32 +08:00
buua436
bd485dbdfe fix: scope compilation template names by group (#16998) dev-20260716-2 2026-07-16 19:37:18 +08:00
Jin Hai
f8474a67f5 Go: tracing framework (#17004)
### Summary

Tracing framework

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-16 19:35:43 +08:00
Lynn
f8cba62108 Fix: sort instance by create_time desc (#16999) 2026-07-16 19:29:21 +08:00
Lynn
f9d7f3d2b4 Fix: add default models for some ocr providers (#16982) 2026-07-16 19:18:48 +08:00
maybehokori
f3a2fb7a10 fix: update somark.tech to somark.cn/somark.ai with purchase URLs (#16892)
## Summary

Update all `somark.tech` references to `somark.cn` (default for China) /
`somark.ai` (for overseas including Taiwan, China; Hong Kong, China;
Macau, China). Users fill in `base_url` manually — default is
`somark.cn`.

### Changes

| File | Change |
|------|--------|
| `constants.py` | Default → `somark.cn` |
| `somark_parser.py` | SAAS_BASE_URL + fallback → `somark.cn` |
| `ocr_model.py` | Default → `somark.cn` |
| `pdf_parser_common.go` | Go default → `somark.cn` |
| `llm.ts` | API key URL → `somark.cn` |
| `en.ts` | Base URL descriptions + purchase URLs |
| `zh.ts` | Base URL descriptions + purchase URLs |

### Purchase URLs
- China: `https://somark.cn/workbench/purchase`
- Overseas: `https://somark.ai/studio/purchase`

---------

Co-authored-by: justinychuang <huangyicheng@soulcode.cn>
Co-authored-by: Jin Hai <haijin.chn@gmail.com>
2026-07-16 19:18:05 +08:00
Haruko386
101155bdc7 fix: support message content (#16980)
### Summary

As Title
<img width="3241" height="1934" alt="image"
src="https://github.com/user-attachments/assets/cb22031c-f200-462a-b871-b4a739e7a66a"
/>
2026-07-16 19:08:36 +08:00
Haruko386
5307ecd520 Go: add tools for moonshot, baidu and minimax (#17000)
### Summary

As title
related to #16990
2026-07-16 19:03:59 +08:00
Jin Hai
c7a623ff81 Go: introduce clickhouse (#16996)
### Summary

Introduce Clickhouse for data statistics.

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-16 18:36:56 +08:00
maoyifeng
caa76fb68e Fix: CI tags cancel running workflow (#17001)
### Summary

1.  Change the CI trigger conditions.  synchronize and  labeled ci
2.  Fix ci: tags canceled running workflow
2026-07-16 17:58:20 +08:00
euvre
feba9e1158 fix: custom empty_response not shown in streaming chat (Go mode) (#16989) 2026-07-16 17:02:40 +08:00
Hz_
9003584e90 fix(go-agent): add input form of ListOperationsComponent and VariableAggregatorComponent (#16987)
## Summary
- Add `GetInputForm()` for `ListOperationsComponent` to expose `Query`
input field in debug UI
- Add `GetInputForm()` for `VariableAggregatorComponent` to expose
`Variables` input field in debug UI

## Test
- Verify input form fields render correctly for both components in the
debug UI
2026-07-16 16:58:38 +08:00
Wang Qi
d8a6cacd0a Fix link file to dataset check the duplicate name (#846) (#16975) 2026-07-16 16:03:27 +08:00
Jin Hai
8bb2cd0fb7 Go: fix db alignment (#16964)
### Summary

Align go db schema with python

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-16 16:00:56 +08:00
Yingfeng
5ab424c10c Revert "fix: remove MySQL document.meta_fields mapping to match Python schema" (#16981)
Reverts infiniflow/ragflow#16929
2026-07-16 15:17:49 +08:00
Jack
fd5487e064 feat: add /api/v1/language endpoint for Go/Python runtime detection (#16952)
Both backends serve GET /api/v1/language. Frontend calls it once and
caches. By this way, front end can know the backend is go or python and
thus can determine which part of logic to load.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-16 15:13:43 +08:00
maoyifeng
92ae4f6769 Fix ci: run ci port confict,pull network timeout (#16979)
### Summary

1. fix ci port confict
2. fix  pull image network timeout
2026-07-16 13:52:29 +08:00
Andrew Chen
198815a365 fix(metadata): meta_filter loses case-insensitive matches and leaks state across dict entries (#16956)
## What

`meta_filter()`'s in-memory `filter_out()` helper has two related bugs
in how it coerces `input`/`value` for comparison operators (`=`, `≠`,
`>`, `<`, `≥`, `≤`):

**1. Asymmetric commit on partial `literal_eval` failure.** The original
code:
```python
input = ast.literal_eval(input)
value = ast.literal_eval(value)
```
runs as two separate statements inside one `try`. If the first succeeds
and the second raises, the first assignment already committed — `input`
and `value` end up as different types, and the subsequent `.lower()`
case-folding silently no-ops for whichever side didn't get lowered as a
string. Concretely: metadata cell `"None"` is a valid Python literal
(`ast.literal_eval("None")` → `None`), but a query value `"none"`
(lowercase) is not — so `status = "none"` never matches a cell whose
value is `"None"`, even though the intended semantics are
case-insensitive.

**2. `value` mutated in place, reused across dict entries.**
`filter_out(v2docs, operator, value)` loops over every `(input, docids)`
pair in `v2docs` and coerces `value` inside the loop body without
resetting it — so once one entry's `literal_eval(value)` succeeds and
rebinds `value` to a non-string, every later entry in the same call
compares against that already-coerced leftover instead of the original
filter value.

## Fix

- Commit both `literal_eval` results together via tuple assignment
(`input, value = ast.literal_eval(input), ast.literal_eval(value)`), so
a failure on either side leaves both operands in their pre-coercion form
instead of a mismatched mix.
- Save the original `value` before the loop and reset it at the top of
each iteration, so per-entry coercion never leaks into the next entry.

## Testing

Added 3 tests to
`test/unit_test/common/test_metadata_filter_operators.py` covering both
symptoms (case-insensitive match against a metadata cell that's a Python
keyword literal, both `=` and `≠`; a numeric `>` comparison unaffected
by an earlier dict entry having coerced the query value). Confirmed red
on `common/metadata_utils.py` at HEAD (`git stash` the fix, tests fail
with the exact symptom described above), green after. Full existing
`test_metadata_filter_operators.py` suite (22/22, including the 3 new
tests) passes. `ruff check` and `ruff format --check` clean on both
touched files.

Sandbox note: this environment has no network access to install
`pytest`/`pytest-asyncio`, so tests were run by importing the test
module and invoking each `test_*` function directly (same approach as
prior PRs from this account against this repo, e.g. #16949).
`test_apply_semi_auto_meta_data_filter.py` (the other file exercising
`meta_filter` indirectly through `apply_meta_data_filter`) needs
`pytest-asyncio` + heavier mocking and wasn't run, but it exercises
`apply_meta_data_filter`'s async/LLM-filter-generation path, not
`filter_out`'s coercion logic touched here.

Cross-referenced open PR #16833 (also touches
`common/metadata_utils.py`) — confirmed via `gh pr diff` it only touches
`convert_conditions`/operator-alias normalization and
`apply_meta_data_filter`'s `None`-vs-`["-999"]` sentinel logic, not
`filter_out`'s comparison-coercion code path. No overlap.

---
This PR was drafted with AI assistance (Claude); I reviewed the change,
independently reproduced both symptoms, and take responsibility for it.

Signed-off-by: chuenchen309 <48723787+chuenchen309@users.noreply.github.com>
2026-07-16 13:42:08 +08:00
Andrew Chen
99a77a574e fix(metadata): discover ES fields after sparse table chunks (#16949)
### What problem does this PR solve?

When a table dataset's `field_map` is missing or stale,
`aggregate_table_doc_metadata` falls back to probing chunk dictionaries
for each column's Elasticsearch field key. It currently performs that
probe only once, against the first dictionary chunk, and caches `(None,
"none")` if the field is absent there.

Sparse table rows commonly omit empty columns. If the first row has no
`notes` field but a later row contains `notes_raw`, the cached miss
causes every later row to be skipped and the document-level `notes`
metadata is silently lost. The result depends only on row order:

```python
chunks = [{}, {"notes_raw": "Handle with care"}]
aggregate_table_doc_metadata(chunks, task)           # before: {}
aggregate_table_doc_metadata(list(reversed(chunks)), task)
# before: {"notes": ["Handle with care"]}
```

This was also identified in CodeRabbit's review of the merged
table-metadata implementation in #15780, but remained unfixed after that
PR merged:
https://github.com/infiniflow/ragflow/pull/15780#pullrequestreview-4448490676

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

### Fix

When the initial lookup found no key for a column, retry the existing
`_resolve_es_chunk_field_key` against the current chunk. Cache the first
successful resolution so subsequent rows retain the existing fast path.
Field-map-backed columns and columns found in the first chunk are
unchanged.

### Testing

- Added `test_aggregate_auto_mode_probes_later_sparse_chunks` with an
empty first row and a populated second row.
- Confirmed red→green: before the fix the assertion received `{}`; after
the fix it receives `{"notes": ["Handle with care"]}`.
- Full existing `test_table_metadata_aggregation.py`: **15 passed**.
- `ruff check` and `ruff format --check`: clean.
- `compileall` for both changed files: clean.

The local test environment did not contain the repository's full service
dependency set and had a corrupt pre-existing NLTK `wordnet.zip`. The
test module does not use those services or corpora, so the run stubbed
only `common.settings` engine flags, `json_repair`, and the global
conftest's NLTK resource lookup; the production module and aggregation
tests themselves ran unchanged.

### Duplicate-work check

Checked all currently open PRs (including changed file paths) and found
none touching `rag/utils/table_es_metadata.py` or its aggregation test.
The earlier #15780 review is historical context, not active competing
work.

### Disclosure

AI-assisted (Codex): the candidate came from an AI-assisted review
queue. I independently reproduced the order-dependent data loss against
the real module, checked the historical review and all open PR file
paths, and ran the regression plus full existing test file before
submitting.

Signed-off-by: chuenchen309 <48723787+chuenchen309@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 13:41:46 +08:00
Wang Qi
46e14fe52b Fix doc.MetaFields undefined (#16976)
Follow on #16929
2026-07-16 13:27:08 +08:00
iwasaki
d577b49a00 fix(embedding): do not append /v1 to Ollama native embedding base_url (#16974) 2026-07-16 13:21:55 +08:00
Zhichang Yu
d2f4304ff4 Fix Pipeline.Run callers and rename SetupOverrides (#16973)
Adapt Pipeline.Run call sites to the new signature and rename the
SetupOverrides family to OverrideParams for consistency.
2026-07-16 13:12:25 +08:00