Commit Graph

7542 Commits

Author SHA1 Message Date
Jin Hai
9f080a4f45 Py: ruff format (#17193)
### Summary

format issue

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-21 21:04:09 +08:00
Wang Qi
1c5a22e226 Enrich the ragflow_client.py (#17189) 2026-07-21 20:18:20 +08:00
Haruko386
b9de586043 fix: add accessible check for datasets (#17116)
### Summary

As title:

Some operations on datasets have been fixed as they previously lacked
authentication, preventing team members from proper or correct usage.

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
dev-20260721-2
2026-07-21 19:20:56 +08:00
Haruko386
d57edee9c3 Go: add funASR provider (#17171)
### Summary

As title

verif ied from CLI

```
RAGFlow(api/default)>  asr with 'paraformer@test@funasr' audio './internal/test.wav' param '{"language": "en"}'
+----------------------------------------------------------------------------------------------------------------------+
| text                                                                                                                 |
+----------------------------------------------------------------------------------------------------------------------+
| The examination and testimony of the experts enabled the commission to conclude that five shots may have been fired. |
+----------------------------------------------------------------------------------------------------------------------+
```
---

<img width="2876" height="1377" alt="image"
src="https://github.com/user-attachments/assets/4cee62c6-1c71-43ce-b398-4d9fbff33c3c"
/>

```bash
INFO:     127.0.0.1:51910 - "POST /v1/audio/transcriptions HTTP/1.1" 200 OK██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00,  2.19it/s]
INFO:     127.0.0.1:60934 - "GET /v1/models HTTP/1.1" 200 OK%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00,  2.10it/s]
```

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-07-21 19:20:34 +08:00
Lynn
340d30eb12 Fix: verify model api (#17183) 2026-07-21 19:09:46 +08:00
euvre
3f9d9529b3 fix(file2document): batch link should add to existing KBs, not replace them (#17172) 2026-07-21 19:05:02 +08:00
Lynn
3f5b765a5f Fix(go): check model availability (#17156) 2026-07-21 19:02:14 +08:00
Jin Hai
a5488d035a Go: refactor to avoid conflicts (#17191)
### Summary

1. merge registery test into ingestion
2. move license code to EE version

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-21 18:47:02 +08:00
qinling0210
edeb47cd54 Implement Tagger in Extractor component in GO (#17128)
### Summary

Implement Tagger in Extractor component in GO
2026-07-21 17:52:06 +08:00
qinling0210
0189ca3700 Port PR14140 and PR16881 to GO (#17102)
### Summary

Port
https://github.com/infiniflow/ragflow/pull/14140/
https://github.com/infiniflow/ragflow/pull/16881
2026-07-21 17:46:23 +08:00
balibabu
20b760f266 Feat: Highlight wiki force graph. (#17160) 2026-07-21 16:48:52 +08:00
Haruko386
08ed962aed fix: Refactor ListConnectors to validate userID and simplify logic (#17152)
### Summary

Trim whitespace from userID and check for empty value. Use userID
directly for listing connectors instead of tenant ID.
2026-07-21 16:47:28 +08:00
Haruko386
294dff4701 fix: add chunk_method field to document handler (#17154)
### Summary

As title
2026-07-21 16:47:12 +08:00
maoyifeng
49374eede3 Go cli: fix list users failed: invalid JSON (unexpected end of JSON ) (#17153)
### Summary

Go cli: fix list users failed: invalid JSON (unexpected end of JSON )
2026-07-21 16:46:45 +08:00
Haruko386
b4ca5d0bfe refactor: encapsulate the code related to tools (#17101)
### Summary

As title
2026-07-21 16:45:29 +08:00
euvre
456e2be161 fix(web): hide folder upload tab for Gmail and Google Drive OAuth JSON upload (#17162) 2026-07-21 16:41:38 +08:00
euvre
5f2b3fc6c5 fix(web): use title case 'API Key' in UI labels across all locales (#17164) 2026-07-21 16:37:27 +08:00
Wang Qi
a6c3dd10ab Update from api_base to base_url (#17158) 2026-07-21 16:36:46 +08:00
euvre
859006c79a fix(web): prevent search popover from flashing at top-left on checkbox toggle (#17148) 2026-07-21 16:13:07 +08:00
euvre
87417d083e Go: disable thinking for search ask summary to fix truncated AI summary (#17155) 2026-07-21 14:54:14 +08:00
euvre
f7a5629487 Fix stale references shown while streaming and empty final reply in Go mode (#17146) 2026-07-21 14:53:40 +08:00
Jack
bb6b43b5c9 fix: docx/email parsing, extractor LLM driver, and chunker alignment (#17144)
## Summary

Three groups of changes across the Go ingestion pipeline:

### 1. DOCX parsing improvements
- **docx_parser.go**: Enhanced DOCX parsing with better structure
extraction and media handling
- **docx_parser_cgo_test.go**, **docx_parser_test.go**: Companion tests
- **office_parsers_no_cgo.go**: Stub sync for non-CGO builds

### 2. Email (.eml) parsing: base64 Content-Transfer-Encoding decoding
- **email_parser.go** (`decodeCTE`): Added Content-Transfer-Encoding
decoding for base64 and quoted-printable. Go's `mime/multipart.Reader`
does not decode Content-Transfer-Encoding automatically, so attachments
with `Content-Transfer-Encoding: base64` remained base64-encoded in the
output. The new `decodeCTE` helper is called after reading each
multipart part's raw bytes in `readMailBody`, mirroring Python's
`part.get_payload(decode=True)`.
- **email_parser_test.go**: Two new tests — simple base64 attachment and
nested multipart/alternative with base64 attachment.

### 3. Extractor LLM driver fix + ModelDriver consolidation
- **extractor.go**: Fixed a bug where the Extractor component used
`ModelFactory.CreateModelDriver()`, which creates bare model instances
without API keys or provider configuration. Switched to
`models.GetPreconfiguredDriver()` which resolves the actual
pre-configured driver from `ProviderManager`, matching the codepath used
by `llm.go`. This fixes auto keyword/question extraction in DSL
pipelines that require LLM calls.
- **get_driver.go** (new): Extracted shared `GetPreconfiguredDriver()`
from `llm.go:newChatModelDriver()` so both `llm.go` and `extractor.go`
use the same codepath.
- **get_driver_test.go** (new): Tests for the shared driver resolution.
- **llm.go**: Replaced inline driver resolution with
`models.GetPreconfiguredDriver()`.

### 4. Chunker fixes and observability
- **group.go** (`extractLineRecords`): Fixed to also read `markdown` and
`html` payload keys — previously it only read `text`/`content`, causing
GroupTitleChunker to silently return empty results for markdown-format
parser output.
- **common.go** (`compileDelimPattern`): Aligned with Python's
`_compile_delimiter_pattern` — only backtick-wrapped delimiters produce
an active regex pattern; plain delimiters are not compiled into the
split regex.
- **token.go** (`applyChildrenDelim`): Set `DocType` and `CKType` to
`"text"` on created ChunkDocs so the token-size merge path correctly
identifies and merges text segments.
- **parser.go**, **extractor.go**, **tokenizer.go**, **group.go**,
**hierarchy.go**: Added debug-level logging for pipeline diagnostics.
- **parser_dispatch_test.go**, **group_test.go**: New tests.

## Verification
- All Go tests pass: `bash build.sh --test ./internal/parser/parser/...`
and `bash build.sh --test ./internal/ingestion/component/...`
- Build succeeds: `bash build.sh --go`
2026-07-21 13:51:17 +08:00
buua436
a730ce7aa6 fix: preserve compilation template kinds and names (#17151) 2026-07-21 13:40:08 +08:00
chanx
bc07b18b88 Refactor: unify navbar icons through HomeIcon wrapper (#17143) 2026-07-21 13:20:44 +08:00
Jin Hai
3cc6539c32 Go: refactor API route (#17139)
### Summary

As title.

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-21 12:18:47 +08:00
balibabu
b288888050 Feat: Add a "None" option for reasoning intensity in the chat message box. (#17006)
### Summary

Feat: Add a "None" option for reasoning intensity in the chat message
box.
2026-07-21 11:50:34 +08:00
euvre
21a4eab43d fix: unify 'BASE URL' to 'Base URL' in locale files (#17138) 2026-07-21 11:31:40 +08:00
Hz_
161d2f0d7b fix(go-agent): include conversation history in agent prompts (#17137)
## Summary

- Load the Agent history window with Python-compatible defaults.
- Include prior conversation messages in ReAct prompts without
duplicating the current user input.

## Testing

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

<img width="2014" height="1121" alt="image"
src="https://github.com/user-attachments/assets/15327e2a-3286-42ec-9415-c06ada758156"
/>
2026-07-21 10:59:46 +08:00
Yurii214
4f1820bcaa fix(agent/tools): surface serpapi error responses in google search (#17062)
### Summary

`agent/tools/google.py` indexes `search["organic_results"]` directly
after `GoogleSearch(params).get_dict()`. serpapi returns `{"error":
...}` **without** an `organic_results` key on realistic conditions — an
invalid API key, an exhausted plan/quota, or a query that matched
nothing. that raised `KeyError('organic_results')`, which the tool's
retry loop then surfaced to the model as the opaque `"Google error:
'organic_results'"` instead of the real reason.

this guards the missing key and raises serpapi's actual `error` message
(with a clear fallback) into the existing retry/`_ERROR` path, so the
model sees e.g. `"Google error: Invalid API key."`. valid responses are
unchanged.

adds `test/unit_test/agent/tools/test_google_unit.py` covering the
error-response path (asserts the real message is surfaced, no
`KeyError`) and the normal result path, mirroring the existing
`test_googlescholar.py` pattern (skips when the `serpapi` SDK is
absent).

---------

Co-authored-by: Yaroslav98214 <diakovichyaroslav30@gmail.com>
2026-07-21 10:58:14 +08:00
euvre
1c828daea1 Fix: shared chatbot completion ignores knowledge base and empty response (#17092) 2026-07-21 10:43:06 +08:00
euvre
ee8aa03fa0 fix(web): regenerate in multi-model chat uses the card's own state and model (#17126) 2026-07-21 10:40:59 +08:00
balibabu
c098c4c296 Fix: The form related to switching the dataset pipeline configuration was not rendered. (#17124) dev-20260721 2026-07-21 10:12:41 +08:00
Wang Qi
178b40cb25 Fix SharePoint connector not run after added (#17058) 2026-07-21 10:06:01 +08:00
Lynn
5c95b57d85 Fix(go): get VolcEngine model list (#17127) 2026-07-21 09:37:11 +08:00
Jin Hai
3670b047f0 Go: add audit log framework (#17129)
### Summary

Prepare for audit log

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 23:50:45 +08:00
euvre
f45f03a016 Add Go service/handler tests for API contract parity (#16905) 2026-07-20 20:02:41 +08:00
Jack
2f7c2eb53c Feat(ingestion): align image to MinIO upload, unify chunk-id computation and add PPT parsing support (#17111)
## Summary

Align the Go ingestion pipeline with Python's `image` → `img_id`
persistence semantics, and unify the chunk-id computation across all
paths.

### Changes

**1. Image upload at chunker stage **

- Add `ImageUploader` type and `DefaultImageUploader` in
`internal/ingestion/component/image_uploader.go` — the write-side
counterpart to `FetchBinary`, storing raw image bytes at `(bucket=kbID,
key=chunkID)`, no re-encoding.
- Add `uploadOneImage` — pure upload primitive (bytes in, `img_id` out),
does not touch chunk maps.
- Add `uploadChunkImages` / `uploadChunkImage` — caller-side helper:
decodes `image` from a chunk, uploads bytes, writes `ck["img_id"]`,
`delete(ck,"image")` , bounded by a process-wide semaphore (default 10,
env `MAX_CONCURRENT_MINIO`).
- Wire via `imageUploadDecorator` in `register.go`: every chunker runs
the upload pass at invocation time, writing `ck["id"]` before upload and
dropping image bytes right after — peak memory = single chunk image
lifetime.

**2. Unify chunk-id computation**

- Consolidate three separate id-computation paths (`component.ChunkID`,
`task.ChunkID`, inline `FormatUint` in API) into one:
`common.ChunkID(docID, text string)`, using `%016x` +
`xxhash.Sum64String(text+docID)` (matching Python `hexdigest()`).
- The chunker decorator writes `ck["id"]` via `common.ChunkID`; the
persist stage (`ProcessChunksForPipeline`) falls back to the same
function (`if !exists id`).
- The API AddChunk path now also calls `common.ChunkID` instead of the
divergent `FormatUint(xxhash.Sum64(...))` — fixing a pre-existing
inconsistency.
- Delete `internal/ingestion/component/chunk_id.go` and
`internal/ingestion/task/chunk_builder.go` (both were pure forwarding
shells).

**3. Preserve `img_id` (never deleted)**

- `img_id` is a persistent index field (Infinity, OB) and the only
consumer-side reference for image retrieval; it is NEVER removed from
the chunk map. Only `image` (raw data URL) is dropped after upload.

**4. PPT parser support**
Previously PPT parsing failed. Add support to parse.

### Key design decisions

| Decision | Choice |
|----------|--------|
| Upload timing | Chunker stage (not persist), so image bytes are
dropped immediately — bounds peak memory to one chunk image |
| Upload concurrency | Process-wide semaphore, default 10 (matches
Python `minio_limiter`), env `MAX_CONCURRENT_MINIO` |
| Image encoding | Store as-is, no JPEG re-encoding (unlike Python) |
| `img_id` format | `"<kb_id>-<chunk_id>"` — matches Python
task_executor path |
| id function | Single `common.ChunkID(docID, text)`, concatenation
`text+docID` inside hash (matching Python) |
| `removeInternalChunkFields` | Retains `delete(ck,"image")` as
defensive fallback for non-chunker paths |

### Files touched

| File | Change |
|------|--------|
| `internal/common/format.go` | Add `ChunkID(docID, text)` |
| `internal/common/format_test.go` | Add ChunkID golden-value test |
| `internal/ingestion/component/image_uploader.go` | Add `ImageUploader`
type + `DefaultImageUploader` |
| `internal/ingestion/component/chunker/image_upload.go` | Add
`uploadOneImage`, `uploadChunkImages`, `uploadChunkImage`,
`decodeChunkImage`, semaphore |
| `internal/ingestion/component/chunker/image_upload_test.go` | Tests:
upload/drop, skip, no-image, concurrency, missing-id error |
| `internal/ingestion/component/chunker/register.go` | Add
`imageUploadDecorator` (writes `ck["id"]`, runs upload) |
| `internal/ingestion/task/chunk_process.go` | Use `common.ChunkID` for
persist fallback |
| `internal/service/chunk/chunk.go` | Use `common.ChunkID` instead of
`FormatUint` |
| `internal/ingestion/component/chunk_id.go` | **Deleted** (moved to
`common`) |
| `internal/ingestion/task/chunk_builder.go` | **Deleted** (shell, no
callers left) |
| `internal/ingestion/task/chunk_builder_test.go` | **Deleted** (test
migrated to `common/format_test.go`) |

### Verification

```
bash build.sh --test ./internal/service/chunk/... ./internal/common/... ./internal/ingestion/component/... ./internal/ingestion/task/...
→ ok   service/chunk / common / component / chunker / schema / task
```
2026-07-20 19:33:51 +08:00
euvre
33765c1a64 Fix: add missing model provider icons (#17122) 2026-07-20 19:30:26 +08:00
euvre
bfd5e842ff style(web): unify model provider parameter labels to uppercase across locales (#17120) 2026-07-20 19:26:48 +08:00
euvre
b769c3edfd fix: soften ask_summary refusal for partially relevant knowledge (#17121) 2026-07-20 19:22:03 +08:00
euvre
8c18c4402a fix(web): make raw memory type non-removable in multi-select (#17119) 2026-07-20 19:20:26 +08:00
Haruko386
da2b1ce6d6 fix: one can edit team's memory (#17104)
### Summary

As title
2026-07-20 19:19:06 +08:00
Haruko386
0cd06e4013 Go: add tools for gitee, volcengine and zhipuAI (#17091)
### Summary

As title

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-07-20 19:18:48 +08:00
euvre
cf95d9ac0d fix(web): avoid flashing empty state when returning to agent list (#17118) 2026-07-20 19:14:49 +08:00
chanx
b3f731d4de Fix: model selection format compat and provider api_key wrapping (#17112) 2026-07-20 19:12:59 +08:00
Lynn
9a2a3c0459 Fix: add new default moonshot model (#17106) 2026-07-20 19:07:26 +08:00
balibabu
392b249404 Feat: Render the skills list using a tree view. (#17115)
### Summary
Feat: Render the skills list using a tree view.
2026-07-20 19:00:08 +08:00
Yurii214
aff9ff6d0a fix(agent/tools): surface github search error responses (#17064)
### Summary

`agent/tools/github.py` indexes `response["items"]` directly after
`requests.get(...).json()`. the github search api returns `{"message":
...}` **without** an `items` key on realistic conditions — a rate limit
(403/429; this tool sends no auth token, so the unauthenticated ~10
req/min search limit is easy to hit) or an invalid query (422). that
raised `KeyError('items')`, which the tool's retry loop then surfaced to
the model as the opaque `"GitHub error: 'items'"` instead of the real
reason.

this guards the missing key and raises the api's actual `message` (with
a clear fallback) into the existing retry/`_ERROR` path, so the model
sees e.g. `"GitHub error: API rate limit exceeded ..."`. valid responses
are unchanged.

adds `test/unit_test/agent/tools/test_github_unit.py` covering the
rate-limit response (asserts the real message is surfaced, no
`KeyError`) and the normal result path.

Co-authored-by: Yaroslav98214 <diakovichyaroslav30@gmail.com>
Co-authored-by: Haruko386 <tryeverypossible@163.com>
2026-07-20 17:53:53 +08:00
Jin Hai
75a8228d33 Fix missing info (#17107)
### Summary

1. Fix docker/service_conf.yaml.template
2. Remove unused config

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 17:32:32 +08:00
euvre
bc8bb9c51a fix(web): capitalize URL and drop exclamation marks in base URL locale strings (#17113) 2026-07-20 17:31:41 +08:00