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

Local ollama issues: loops forever on random problems: problems with saving/ovewriting, no closing fence #55

Closed
w84death opened this issue May 24, 2024 · 3 comments
Labels
🪲 bug Something isn't working

Comments

@w84death
Copy link

w84death commented May 24, 2024

Running local ollama run deepseek-coder:6.7b
Kubuntu 24.04, RTX 2060 6GB VRAM

Fail to generate files
It loops forever trying to run CreateFileTool.function() but got too many arguments.

+------------------------------------------------------------------------------------------+
|   Devon is thinking:                                                                     |
|   I understand that we are creating a website about some of my indie games which were    |
|   created using Assembly language for the x86 boot sector. I need to create the          |
|   necessary files and directories for this project.                                      |
|                                                                                          |
+------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------+
|   Devon ran: Running command:                                                              |
|   create_file index.html                                                                   |
|   ```                                                                                      |
|   <DOCTYPE html>                                                                     |
|   <html>                                                                             |
|   <head>                                                                             |
|        <title>My Indie Games</title>                                           |
|   </head>                                                                            |
|   <body>                                                                             |
|        <h1>Welcome to my indie games website</h1>                              |
|        <p>Here you can find information about some of my favorite indie games, all   |
|    made using Assembly language for the x86 boot sector.</p>                         |
|   </body>                                                                            |
|   </html>                                                                            |
|   ```                                                                                      |
|                                                                                            |
|   > CreateFileTool.function() takes from 3 to 4 positional arguments but 44 were given     |
+--------------------------------------------------------------------------------------------+

Generate first file but fails with updating it
After restarting and given same prompt it now creates index.html but then loops forever trying to update the file.

+-------------------------------------------------------------------------------------------+
|   Devon is thinking:                                                                      |
|   I understand the user's request to create a website about his indie games, which are    |
|   written in Assembly language and targeting an x86 boot sector. I will start by          |
|   creating a basic HTML structure for the site.                                           |
|                                                                                           |
+-------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------+
|   Devon ran: Running command:                                                        |
|   create_file index.html                                                             |
|   <<<                                                                                |
|   &lt;DOCTYPE html&gt;                                                               |
|   &lt;html lang="en"&gt;                                                             |
|   &lt;head&gt;                                                                       |
|        &lt;meta charset="UTF-8"&gt;                                                  |
|        &lt;title&gt;My Indie Games&lt;/title&gt;                                     |
|   &lt;/head&gt;                                                                      |
|   &lt;body&gt;                                                                       |
|        &lt;h1&gt;Welcome to my indie games website&lt;/h1&gt;                        |
|   &lt;/body&gt;                                                                      |
|   &lt;/html&gt;                                                                      |
|   >>>                                                                                |
|                                                                                      |
|   > Failed to create file: index.html. Error: Could not create file, file already    |
|   exists: /home/kj/Code/devon/games-web/index.html                                   |
+--------------------------------------------------------------------------------------+

Not valid HTML files
The file itself lacks proper TAGs:

&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;My Indie Games&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Welcome to my indie games website!&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;

This only happens once.

Not closing fence

Third restart (clean folder) it generates valid index.html:

+--------------------------------------------------------------------------------------------+
|   Devon is thinking:                                                                       |
|   I understand the requirement of creating a website for my indie games. I will start by   |
|    creating an HTML file that serves as the main page of our website. This will include    |
|   information about the game catalog, introduction and instructions on how to run them     |
|   (in emulator or from floppy).                                                            |
|                                                                                            |
+--------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------+
|   Devon ran: Running command:                                                              |
|   create_file index.html                                                                   |
|   <<<                                                                                      |
|   <!DOCTYPE html>                                                                          |
|   <html>                                                                                   |
|       <head>                                                                               |
|           <title>Indie Games Catalog</title>                                               |
|       </head>                                                                              |
|       <body>                                                                               |
|           <h1>Welcome to our Indie Games Catalog</h1>                                      |
|           <p>Here you can find a collection of indie games developed in assembly for x86   |
|    bootsector.                                                                             |
|           Each game comes with an introduction and instructions on how to run them (in     |
|   emulator or from floppy).</<|begin▁of▁sentence|>                                       |
|       </body>                                                                              |
|   </html>                                                                                  |
|   >>>                                                                                      |
|                                                                                            |
|   > Successfully created file /home/kj/Code/devon/games-web/index.html                     |
+--------------------------------------------------------------------------------------------+

..but then loops forever on No closing fence (>>>) :

+--------------------------------------------------------------------------------------------+
|   Devon is thinking:                                                                       |
|   I understand the requirement of creating a website for my indie games. I will start by   |
|    creating an HTML file that serves as the main page of our website. This will include    |
|   information about the game catalog, introduction and instructions on how to run them     |
|   (in emulator or from floppy).                                                            |
|                                                                                            |
+--------------------------------------------------------------------------------------------+
+------------------------------------------------------------+
|   Devon ran:                                               |
|   > No closing fence (>>>) found for multiline argument.   |
+------------------------------------------------------------+

Clean the folder (because it can not overwrite files) and it's the same thing with good html and then No closing fence loop.

@emlazzarin
Copy link

I have the same issue consistently with gpt-4o, so I don't think this is specific to local ollama.

@akiradev0x
Copy link
Contributor

@emlazzarin @w84death Hey guys! thanks for this, I am going to try to find a fix for it, seems like a bug in the parsing code. Will fix today :)

@akiradev0x
Copy link
Contributor

Just solved this with an update to the parser!

Also this seems to sometimes be a model hallucination problem. At least for deepseek. I'll be adding support to enforce output structure soon. Opened an issue for this: #62

closing!

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

4 participants