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

gpt4all does not generate notebook (using /generate) #787

Open
xhejtman opened this issue May 19, 2024 · 1 comment
Open

gpt4all does not generate notebook (using /generate) #787

xhejtman opened this issue May 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@xhejtman
Copy link

Description

trying to generate an example notebook throws error:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.11/site-packages/jupyter_ai/chat_handlers/base.py", line 125, in on_message
    await self.process_message(message)
  File "/opt/conda/lib/python3.11/site-packages/jupyter_ai/chat_handlers/generate.py", line 279, in process_message
    final_path = await self._generate_notebook(prompt=message.body)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/jupyter_ai/chat_handlers/generate.py", line 255, in _generate_notebook
    outline = await generate_outline(prompt, llm=self.llm, verbose=True)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/jupyter_ai/chat_handlers/generate.py", line 59, in generate_outline
    outline = parser.parse(outline)
              ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/langchain_core/output_parsers/pydantic.py", line 64, in parse
    return super().parse(text)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/langchain_core/output_parsers/json.py", line 72, in parse
    return self.parse_result([Generation(text=text)])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/langchain_core/output_parsers/pydantic.py", line 60, in parse_result
    json_object = super().parse_result(result)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/langchain_core/output_parsers/json.py", line 69, in parse_result
    raise OutputParserException(msg, llm_output=text) from e
langchain_core.exceptions.OutputParserException: Invalid json output: The outline should be organized into sections with headings indicating their content. Each section should have at least one subsection.

clearly returing the text: The outline should be organized into sections with headings indicating their content. Each section should have at least one subsection. instead of JSON.

Using model: nous-hermes-llama2-13b.Q4_0.gguf

packages:

gpt4all                   2.6.0                    pypi_0    pypi
langchain                 0.1.20                   pypi_0    pypi
langchain-community       0.0.38                   pypi_0    pypi
langchain-core            0.1.52                   pypi_0    pypi
langchain-openai          0.1.7                    pypi_0    pypi
langchain-text-splitters  0.0.2                    pypi_0    pypi
langsmith                 0.1.59                   pypi_0    pypi
jupyter-ai                2.15.0                   pypi_0    pypi
jupyter-ai-magics         2.15.0                   pypi_0    pypi
jupyterlab                4.0.7              pyhd8ed1ab_0    conda-forge
@xhejtman xhejtman added the bug Something isn't working label May 19, 2024
Copy link

welcome bot commented May 19, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant