Commit Graph

731 Commits

Author SHA1 Message Date
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
euvre
2e06c1dfcc fix[go]: stop leaking [DONE] sentinel into streamed chat answers (#17084) 2026-07-20 13:23:44 +08:00
Jack
b20ca452e6 Remove selectUploadParser: documents now inherit parser_id from KB directly (#17083) 2026-07-20 12:59:06 +08:00
Jack
c396ae912e Remove redundant PatchDSL and consolidate component-param injection into override_params (#17079)
## Summary

`Pipeline.Run` already accepts an `override_params` map (keyed by
`cpnID`, override-wins) that is merged into each component's params at
compile time via `canvas.WithOverrideParams`. `PatchDSL` performed a
byte-for-byte equivalent merge by baking `ParserConfig` into the DSL
text before compilation, so `runPipelineWithDSL` applied the same
`Doc.ParserConfig` twice with no effect.

## Change

- Delete the now-dead `PatchDSL` function
(`internal/ingestion/pipeline/pipeline.go`); it had a single call site.
- In `runPipelineWithDSL`, compile the DSL unchanged and pass the
extracted component params to `Run` as `override_params`.

## Behavioral note (important)

Previously `PatchDSL` was also the channel that delivered the tenant LLM
id into Extractor components: it baked `parserConfig` — after
`common.InjectExtractorLLMID(parserConfig, Tenant.LLMID)` had injected
`llm_id` — into the DSL. The old `Run` override_params re-cast
`Doc.ParserConfig` (which intentionally omits `llm_id`). So removing
`PatchDSL` while keeping that re-cast would have silently dropped LLM id
injection. This change passes the local `parserConfig` (the
LLMID-injected copy) to `Run`, preserving the prior behavior.

The DSL string returned by `runPipelineWithDSL` is only consumed by
`recordPipelineLog` (structure storage) and `ExtractPayload` (which
reads the terminal structure, not params), so returning the original DSL
is equivalent.

## Test plan

- `bash build.sh --test ./internal/ingestion/task/...
./internal/ingestion/pipeline/...` — both packages pass.
- `gofmt` clean; pre-commit hooks pass.

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-20 11:46:07 +08:00
Haruko386
0f94e05ffa refactor[go]: replace DSModel with ModelListItem (#17038) 2026-07-20 10:50:53 +08:00
Haruko386
a9db04ab23 fix: unable to got SEE response when use tools (#17076)
### Summary

As title
2026-07-20 10:50:30 +08:00
Jack
965590ccbe Refactor: dataset/document/file service (#17071)
### Summary

Refactor dataset.go document.do file.go file2document.go in
internal/service.
2026-07-20 09:48:24 +08:00
Jin Hai
20f866e703 Go: refactor (#17072)
Refactor stats

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-19 09:26:44 +08:00
Jin Hai
b8d06d02e6 Go: add stats (#17061)
### Summary

Add LLM token stats framework

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-07-18 21:02:07 +08:00
Haruko386
efc675cf50 fix: forget to take reference/prompt in pipeline final (#17032)
### Summary

As title:

fixed: 
<img width="3710" height="2036"
alt="img_v3_0213m_b4b79593-43cd-4dd3-a1dc-ce8a6b34645g"
src="https://github.com/user-attachments/assets/5045f2d2-cef1-4f91-9d3b-c79da78a6716"
/>
2026-07-18 18:45:57 +08:00
Hz_
8945f66814 fix(go-agent): handle await response prompts correctly (#17044)
## Summary

- Prevent downstream agents from reusing stale `sys.query` values.
- Resolve Await Response tips from the current canvas state and honor
`enable_tips`.

## Testing

- `bash build.sh --test ./internal/agent/component/...`
- `bash build.sh --test ./internal/agent/canvas/...`
2026-07-18 18:44:00 +08:00
Haruko386
4a134e6035 Go: add tools for xiaomi provider (#17054)
### Summary

As title

<img width="3716" height="2033" alt="image"
src="https://github.com/user-attachments/assets/09aac6c5-0352-4656-a89b-ae1bcacf4ef1"
/>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-07-18 18:43:15 +08:00
zcxGGmu
a7b193d77b fix: align pdf table structure coordinates (#17016)
### What problem does this PR solve?

Table structure recognition rows, columns, headers, and spans are
produced in cropped table image coordinates, while OCR boxes are matched
later in page-cumulative coordinates. Comparing those boxes without
normalization can skip or misassign table row and column metadata.

Closes #16992.

### What is changed?

- Map TSR components from cropped or rotated table-image coordinates
back into page-cumulative coordinates before matching OCR boxes.
- Reuse one inverse rotation transform for rotated OCR boxes and TSR
components.
- Keep TSR layout ids in the same `table-N` form used by table OCR
boxes.
- Sort columns by mapped page x-coordinate after coordinate
normalization.
- Add focused unit coverage for page offsets, zoom scaling, and
90/180/270 degree rotated tables.

### Type of change

- [x] Bug fix
- [x] Test coverage

### How has this been tested?

- `uv run --group test pytest
test/unit_test/deepdoc/parser/test_pdf_parser_table_coordinates.py -q`
- `uv run --no-sync --group test pytest
--confcutdir=test/unit_test/deepdoc/parser
test/unit_test/deepdoc/parser/test_pdf_parser_table_coordinates.py -q`
- `uv run ruff check deepdoc/parser/pdf_parser.py
test/unit_test/deepdoc/parser/test_pdf_parser_table_coordinates.py`
- `uv run --no-sync python -m py_compile deepdoc/parser/pdf_parser.py
test/unit_test/deepdoc/parser/test_pdf_parser_table_coordinates.py`
- `git diff --check`

A later dependency-sync attempt was blocked while resolving the
`en-core-web-sm` wheel from GitHub, and the repository-level unit-test
conftest can try to download missing NLTK `wordnet` data when it is not
already present locally. The focused parser test above does not require
that data fixture.

---------

Co-authored-by: zq <zhouquan1511@163.com>
2026-07-18 18:22:33 +08:00
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
euvre
6da5085073 feat: add chat-level TTS and ASR endpoints for Go API server (#17036) 2026-07-17 17:22:57 +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
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
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
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
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
euvre
c599dc6c52 fix: remove dangling MetaFields reference and skip affected Go backend tests (#16983) 2026-07-16 20:20:29 +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
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