Skip to content

[Bug]: HTTP API Returns Empty Values for chunk_method, permission, and language Fields When Passing Empty Strings #5709

Closed
@asiroliu

Description

@asiroliu

Is there an existing issue for the same bug?

  • I have checked the existing issues.

RAGFlow workspace code commit ID

x

RAGFlow image version

cb1febb7d8ae (infiniflow/ragflow:v0.17.0-slim)

Other environment information

Actual behavior

When creating a dataset via the HTTP API, passing empty strings for the chunk_method, permission, and language fields results in these fields being returned as empty in the response, despite expected default values.

Expected behavior

No response

Steps to reproduce

1. Send a POST request with empty strings for chunk_method, permission, and language:

response = http_api_client.post(
    f'http://127.0.0.1:9380/api/v1/datasets',
    json={
        "name": "test",
        "language": "",
        "permission": "",
        "chunk_method": ""
    }
)
2. Observe the response:

{
    "code": 0,
    "data": {
        "chunk_method": "",
        "language": "",
        "name": "test",
        "permission": "",
      // ...other fields
    }
}

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions