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

Bug when running the deepseek example #117

Open
hhamud opened this issue Jan 9, 2025 · 0 comments
Open

Bug when running the deepseek example #117

hhamud opened this issue Jan 9, 2025 · 0 comments

Comments

@hhamud
Copy link

hhamud commented Jan 9, 2025

This is the errors I get when I run the deepseek example with local ollama embeddings

INFO:nano-graphrag:Writing graph with 1591 nodes, 2360 edges
Traceback (most recent call last):
  File "/Users/user/Documents/projects/sen-legal-rag/gem_nano.py", line 131, in <module>
    insert()
  File "/Users/user/Documents/projects/sen-legal-rag/gem_nano.py", line 124, in insert
    add_markdown_files_to_rag("./docs", rag)
  File "/Users/user/Documents/projects/sen-legal-rag/gem_nano.py", line 29, in add_markdown_files_to_rag
    rag.insert(f.read())
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/nano_graphrag/graphrag.py", line 207, in insert
    return loop.run_until_complete(self.ainsert(string_or_strings))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/nano_graphrag/graphrag.py", line 311, in ainsert
    await generate_community_report(
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/nano_graphrag/_op.py", line 650, in generate_community_report
    this_level_communities_reports = await asyncio.gather(
                                     ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/nano_graphrag/_op.py", line 625, in _form_single_community_report
    response = await use_llm_func(prompt, **llm_extra_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/nano_graphrag/_utils.py", line 177, in wait_func
    result = await func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/gem_nano.py", line 53, in deepseepk_model_if_cache
    response = await openai_async_client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/openai/resources/chat/completions.py", line 1720, in create
    return await self._post(
           ^^^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1849, in post
    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1543, in request
    return await self._request(
           ^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1646, in _request
    return await self._process_response(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/openai/_base_client.py", line 1743, in _process_response
    return await api_response.parse()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/openai/_response.py", line 424, in parse
    parsed = self._parse(to=to)
             ^^^^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/openai/_response.py", line 259, in _parse
    data = response.json()
           ^^^^^^^^^^^^^^^
  File "/Users/user/Documents/projects/sen-legal-rag/.venv/lib/python3.12/site-packages/httpx/_models.py", line 766, in json
    return jsonlib.loads(self.content, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/user/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 30 column 1 (char 29)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant