Commit Graph

761 Commits

Author SHA1 Message Date
Jin Hai
d19a036cda Go: add context to lots of interface (#17253)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-22 22:30:57 +08:00
Hz_
2487d4b8f7 feat(go-models): expand providers (SiliconFlow, Qiniu, Huawei Cloud, Jina) tool call support (#17241)
## Summary

- Add tool call support for SiliconFlow, Qiniu, Huawei Cloud, and Jina
while consolidating shared OpenAI-compatible helpers used by Aliyun
- Handle streaming tool call deltas and advertise tool support for
eligible provider models
- Add cross-provider tool call tests and enable Qiniu connection
verification through the models endpoint

#16990
2026-07-22 21:27:58 +08:00
Haruko386
29292e9622 fix: can get duplicate agent-name when update agent (#17232)
### Summary

As title
2026-07-22 21:27:25 +08:00
Haruko386
1d165c7315 fix: unable to get owner in chat and search (#17244)
### Summary

As title
2026-07-22 21:27:08 +08:00
Haruko386
48b63ab6b0 fix: cannot not show embed ID in listMemories (#17211)
### Summary

As title
2026-07-22 21:26:44 +08:00
euvre
11c08fe62e fix(go): resolve tenant model IDs in memory create/update without hard failure (#17176) 2026-07-22 19:34:41 +08:00
euvre
f4a61efbb4 fix: keep memory card position stable after rename or config update (#17234) 2026-07-22 19:22:29 +08:00
Jack
8669c469d5 fix(ingestion): align laws DSL with Python — heading fallback, colon-title, short-line filter, remove_toc, and image extension mapping (#17200)
## Summary

This PR aligns the Go ingestion pipeline's **Laws** DSL template with
the Python implementation by fixing heading-detection gaps, adds
image-extension support, refactors the **Extractor** component's LLM
resolution, hardens heading detection for CJK text, and makes the
Extractor accept the Python DSL prompt key names
(`sys_prompt`/`prompts`) alongside the Go names.

## Changes

### 1. Picture file-type detection (`internal/utility/file.go`)

Adds explicit mapping for common image extensions (png, jpg, jpeg, gif,
bmp, tiff, tif, webp, svg, ico, avif, heic, apng) → `FileTypeVISUAL`,
with regression tests.

### 2. Laws DSL heading-detection alignment
(`internal/ingestion/component/chunker/`)

Four fixes to `resolveTitleLevels`:

| Fix | What changed | Why |
|-----|-------------|-----|
| **DOCX `ck_type` fallback** | `ckType` field on `lineRecord`,
propagated from `ChunkDoc.CKType` in `recordsFromStructured`. When
`ck_type=="heading"`, assign `fallbackLevel`. | office_oxide extracts
DOCX heading metadata, but the info was lost before reaching the heading
detector. Word headings whose text doesn't match any regex (e.g.
"Introduction") were treated as body. |
| **`make_colon_as_title` promotion** | `isColonTitle()`: promotes lines
ending with `:`/`:` that have sentence-ending punctuation before the
colon and ≥32 runes between them. | Mirrors Python's
`make_colon_as_title` in `rag/nlp/__init__.py`. Triple guard prevents
false positives. |
| **Short/numeric line filter** | Lines with ≤1 rune or purely numeric
are pinned to body level. | Mirrors Python `tree_merge`'s filter of
`sections` where `len(...) <= 1` or `re.match(r"[0-9]+$", ...)`. |
| **PDF `remove_toc`** | `"remove_toc": true` added to the PDF parser
setup in `ingestion_pipeline_laws.json`. | The Go PDF parser already
supports TOC removal; the Book template already enables it. |

### 3. Extractor llm_id resolution
(`internal/ingestion/component/extractor.go`)

Refactored to handle both **bare tenant_model UUIDs** and **composite
model@provider** strings via the shared `resolveModelConfig`
(`dispatch_model.go`):

- **`resolveExtractorChatConfig`** — UUID path calls
`resolveModelConfigByID` directly (one DB hit); composite path goes
through `resolveModelConfig`. Added `isBareTenantModelID` pre-check for
clear errors when a UUID doesn't exist.
- **`resolveExtractorChatTarget`** — propagates resolution errors
instead of silently returning empty driver.
- **`Chat()`** — removed `driver = "dummy"` fallback. Missing driver is
now an explicit error.
- **Removed dead code**: `splitExtractorLLID`,
`findExtractorSoleActiveInstance`.

### 4. `InjectExtractorLLMID` — fallback when no user config
(`internal/common/parser_config.go`)

Injects the tenant's global default LLM into extractor components **only
when their `llm_id` is empty**. Preserves user-selected UUID or
model@provider values.

Priority: user-configured llm_id > tenant global default > error (no
silent dummy fallback).

### 5. `ResponseHeaderTimeout` increase
(`internal/entity/models/base_model.go`)

`ResponseHeaderTimeout` 60s → 120s in `NewDriverHTTPClient`. Reasoning
models with large extraction prompts can take longer than 60s to produce
the first response token.

### 6. CJK rune-aware heading detection
(`internal/ingestion/component/chunker/title.go`)

Two byte-vs-rune bugs that only manifest on CJK text:

| Fix | What changed | Why |
|-----|-------------|-----|
| **`isColonTitle` byte offset** | `body[lastPunct+1:]` →
`body[lastPunct+runeLen:]` via `utf8.DecodeRuneInString` |
`strings.LastIndexAny` returns a byte index; `+1` skips only 1 byte,
corrupting multi-byte CJK punctuation (e.g. `。` = 3 bytes) and inflating
the rune count past the 32-rune threshold → false-positive heading
promotion. |
| **Short-line filter byte count** | `len(text) <= 1` →
`utf8.RuneCountInString(text) <= 1` | Go `len` is UTF-8 bytes; a single
CJK char (3 bytes) passed the filter, but Python's `len` returns 1 →
mismatch. |

### 7. `extractor_tag.go` — log error when llm fails

When `resolveExtractorChatTarget` returned an error, `runAutoTags` will
log error.

### 8. Python DSL prompt-key compatibility
(`internal/ingestion/component/extractor.go`)

The Resume DSL template uses Python-side key names (`sys_prompt`,
`prompts`). `NewExtractorComponent` now accepts them as fallbacks
alongside the Go names:

- `system_prompt` (Go) ← `sys_prompt` (Python) as fallback
- `prompt` (Go string) ← `prompts` (Python array `[{"role","content"}]`,
takes `[0].content`) as fallback

Mirrors the alias pattern already in `internal/agent/component/llm.go`.
`resolveInputs` accepts per-call `sys_prompt` override too.

## Remaining gaps vs Python

| Gap | Scope | Impact |
|-----|-------|--------|
| **TOC removal for TXT/MD/HTML** | Python's `remove_contents_table`
works on all text formats; Go's `remove_toc` is PDF-only. | Low —
plain-text documents rarely contain structured TOCs. |
| **Regex pattern details** | Minor differences in quantifiers, missing
H5/H6 markdown patterns, missing 4-level numbering pattern. | Low — Go's
variants are stricter; DOCX headings are covered by `ck_type` fallback.
|

## Testing

- `TestHierarchyTitleChunker_CKTypeHeadingFallback` — DOCX `ck_type`
heading promotion
- `TestHierarchyTitleChunker_ColonTitlePromotion` /
`_ColonTitleShortLine_Negative` — colon-title promotion + guard
- `TestIsColonTitle_CJKEdgeCase` / `TestIsColonTitle_ASCII_NoRegression`
— CJK byte-offset fix + ASCII regression
- `TestHierarchyTitleChunker_ColonTitlePromotion_CJK_EdgeCase` — CJK
colon edge case through full pipeline
- `TestHierarchyTitleChunker_ShortSingleCJKLineFilter` — single CJK char
filtered to body
- `TestHierarchyTitleChunker_ShortNumericLineFilter` — purely numeric
lines filtered
- `TestGetFileType_ImageExtensions` / `_ExistingFormats_NoRegression` —
image extension mapping
- `TestInjectExtractorLLMID_SkipWhenUUID` / `_SkipWhenComposite` /
`_InjectWhenEmpty` — llm_id injection guard
- `TestIsBareTenantModelID` — UUID detection
- `TestResolveExtractorChatTarget_AtSplitFallback` / `_NoDriver` — @
split fallback without DB
- `TestNewExtractorComponent_SysPromptAlias` / `_PromptsArray` /
`_PromptsArray_PromptWins` / `_SystemPromptWinsOverSysPrompt` — Python
key compatibility
- `TestBuildDOCXJSONSections_List` / `_TextBox` / `_MixedWithList` —
DOCX list/text_box parsing
- Full ingestion test suite passes (chunker, pipeline, task, service,
component packages)
2026-07-22 19:14:32 +08:00
Lynn
32ddf59ac6 Fix: go restful api tests (#17247) 2026-07-22 19:06:08 +08:00
Haruko386
db18766027 fix: unable use agent as a tool in agent component (#17228)
### Summary

As title

<img width="3774" height="2128" alt="image"
src="https://github.com/user-attachments/assets/b1ce69b0-2298-4c0c-92de-8d840938e4f0"
/>
2026-07-22 19:04:55 +08:00
Hz_
45ca5f9a3d fix(go-agent): route graph step errors through exception outputs (#17167)
## Summary

- Route ReAct graph step-limit errors through the Agent `_ERROR` output.
- Align the Go Agent default max rounds with Python by using five
rounds.
- Preserve cancellation, timeout, and configuration errors as real
failures.

## Testing

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

<img width="2050" height="1409" alt="image"
src="https://github.com/user-attachments/assets/108e2d27-e115-4595-91a2-21f90c2531ae"
/>
2026-07-22 19:00:53 +08:00
euvre
e0ae22e83b fix(agent): prevent double reply when Agent node is followed by Message node (#17233) 2026-07-22 14:59:29 +08:00
euvre
bab7302265 fix(go): nil pointer dereference in ZhipuAI Embed method (#17219) 2026-07-22 13:59:06 +08:00
euvre
8408f9a4e2 Go: only unlink file-manager files when deleting documents from a knowledge base (#17175) 2026-07-22 12:14:22 +08:00
euvre
4697ee29aa fix: avoid duplicate document names when linking files to datasets (#17181) 2026-07-22 12:12:23 +08:00
euvre
fe3e87361d fix(agent): restrict permission field edits to canvas owner only (#17185) 2026-07-22 12:09:22 +08:00
euvre
03e583f9bc fix: add create_date field to APIKeyResponse for token list display (#17186) 2026-07-22 12:08:16 +08:00
Hz_
b175ed582f fix(go-agent): support Tavily tool names (#17163)
## Summary

- Register `TavilySearch` and `TavilyExtract` Canvas component names in
the Go Agent tool registry.
- Add regression coverage for building both tools by their Python
component names.

## Testing

- `bash build.sh --test ./internal/agent/tool/...`
- `bash build.sh --test ./internal/agent/component/...`
2026-07-22 10:38:26 +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>
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
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
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
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
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
euvre
1c828daea1 Fix: shared chatbot completion ignores knowledge base and empty response (#17092) 2026-07-21 10:43:06 +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
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
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
Hz_
e87008e26c fix(go-agent): support Aliyun tool calls (#17099)
## Summary

  - Enable synchronous and streaming tool calls for Aliyun models.
- Preserve provider-specific chat endpoints and prevent repeated
qwen-flash tool calls.
  - Restrict retrieval tool inputs to model-provided query parameters.

  ## Testing

- `bash build.sh --test ./internal/entity/models
./internal/agent/component ./internal/agent/tool`
  - Manual frontend UI testing passed.
2026-07-20 15:54:55 +08:00
Haruko386
64541048c8 fix: unable to use multi model chat (#17097)
### Summary

As title
2026-07-20 15:48:26 +08:00
euvre
624b4b03f3 fix[go]: skip LLM call for shared chatbot session handshake (#17095) 2026-07-20 15:30:50 +08:00
Jin Hai
b2e88c9933 Go: fix missing route (#17094)
As title.

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 14:52:09 +08:00
Jin Hai
6b8a76c659 Go: refactor API route for EE (#17093)
### Summary

As title.

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 14:34:35 +08:00
Jin Hai
7ad27adecb Go CLI: add admin stats commands (#17090)
### Summary

```
RAGFlow(admin)> STATS USERS TOP 5 FROM '2026-01-01' TO '2026-02-01';
+-----------------------+----------------------------------------------+------------+---------------------+-----+
| command               | error                                        | from_date  | to_date             | top |
+-----------------------+----------------------------------------------+------------+---------------------+-----+
| get_token_users_stats | 'Get API token users stats' is not supported | 2026-01-01 | 2026-02-01 23:59:59 | 5   |
+-----------------------+----------------------------------------------+------------+---------------------+-----+
RAGFlow(admin)> STATS USER 'aaa@aaa.com' FROM '2026-01-01' TO '2026-02-01' MONTH;
+-----------------+----------------------------------------+------------+-------------+---------------------+-------------+
| command         | error                                  | from_date  | granularity | to_date             | user_name   |
+-----------------+----------------------------------------+------------+-------------+---------------------+-------------+
| get_token_stats | 'Get API token stats' is not supported | 2026-01-01 | month       | 2026-02-01 23:59:59 | aaa@aaa.com |
+-----------------+----------------------------------------+------------+-------------+---------------------+-------------+
RAGFlow(admin)> STATS SUMMARY FROM '2026-01-01' TO '2026-02-01' MONTH;
+-----------+------------------------------------------------+
| field     | value                                          |
+-----------+------------------------------------------------+
| to_date   | 2026-02-01 23:59:59                            |
| command   | get_token_stats_summary                        |
| error     | 'Get API token stats summary' is not supported |
| from_date | 2026-01-01                                     |
+-----------+------------------------------------------------+
```

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 14:24:28 +08:00
Jin Hai
1fdf167f79 Go: refactor system stats (#17089)
### Summary

Move stats to a specific service from system

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-20 14:13:05 +08:00