Skip to content

[Bug]: add_resource无法保留层级目录,同名文件会丢失 #540

@llors-chen

Description

@llors-chen

Bug Description

同名文件存在录入问题,复杂目录结构没有得到保留

Steps to Reproduce

(https://github.com/user-attachments/files/25924839/example.py)
使用官方example进行结构测试

Expected Behavior

Image对上述文件目录进行add_resource的测试中,尝试加入preserve_structure配置来保留原目录的目录结构但是不生效。
期望保留和diag3的目录结构相同

Actual Behavior

Image

[example.py]
同时发现两个同名文件121221.md的内容没用重叠甚至内容层级更深的121221.md没有被录入。以下是viking/resource的目录保留结构

Image

Minimal Reproducible Example

Error Logs

OpenViking Version

0.2.6

Python Version

3.11.1

Operating System

Windows

Model Backend

OpenAI

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions