Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OBSFileLoader.load() didn't seperate file content as expect #29245

Open
5 tasks done
Junon-Gz opened this issue Jan 16, 2025 · 0 comments
Open
5 tasks done

OBSFileLoader.load() didn't seperate file content as expect #29245

Junon-Gz opened this issue Jan 16, 2025 · 0 comments
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature

Comments

@Junon-Gz
Copy link
Contributor

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangChain documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

from obs import ObsClient
from langchain_community.document_loaders import OBSFileLoader
client = ObsClient(access_key_id=ak, secret_access_key=sk, server=server)
obs = OBSFileLoader(bucket,key_name,client,endpoint)
obs.load()

#[Document(metadata={'source': 'whole content of in `key_name` file')]

Error Message and Stack Trace (if applicable)

No response

Description

  • I expect to see [Document(metadata={'source': 'segment 1'),Document(metadata={'source': 'segment ')...]
  • Instead, [Document(metadata={'source': 'whole content of file')]

System Info

System Information

OS: Windows
OS Version: 10.0.19045
Python Version: 3.11.11 | packaged by conda-forge | (main, Dec 5 2024, 14:06:23) [MSC v.1942 64 bit (AMD64)]

Package Information

langchain_core: 0.3.29
langchain: 0.3.14
langchain_community: 0.3.14
langsmith: 0.2.10
langchain_huggingface: 0.1.2
langchain_milvus: 0.1.8
langchain_openai: 0.3.0
langchain_text_splitters: 0.3.5

Optional packages not installed

langserve

Other Dependencies

aiohttp: 3.11.11
async-timeout: Installed. No version info available.
dataclasses-json: 0.6.7
httpx: 0.28.1
httpx-sse: 0.4.0
huggingface-hub: 0.27.1
jsonpatch: 1.33
langsmith-pyo3: Installed. No version info available.
numpy: 1.26.4
openai: 1.59.7
orjson: 3.10.13
packaging: 24.2
pydantic: 2.10.4
pydantic-settings: 2.7.1
pymilvus: 2.5.3
PyYAML: 6.0.2
requests: 2.32.3
requests-toolbelt: 1.0.0
sentence-transformers: 3.3.1
SQLAlchemy: 2.0.36
tenacity: 9.0.0
tiktoken: 0.8.0
tokenizers: 0.21.0
transformers: 4.47.1
typing-extensions: 4.12.2
zstandard: Installed. No version info available.

@dosubot dosubot bot added the 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature label Jan 16, 2025
ccurme pushed a commit that referenced this issue Jan 16, 2025
- **Description:** add mode arg to OBSFileLoader.load() method
  - **Issue:** #29245
  - **Dependencies:** no dependencies required for this change

---------

Co-authored-by: Junon_Gz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant