CrazyNeil / OllamaSpring

Ollama Client for macOS
https://www.ollamaspring.com
MIT License
43 stars 1 forks source link

Issue with OllamaSpring application on latest version 1.1.6 #3

Open antofalinux opened 2 weeks ago

antofalinux commented 2 weeks ago

Description:

I am experiencing issues with running the OllamaSpring application on my local machine. The details of the problem are as follows:

Problem:

When attempting to run the application, it loads correctly but does not respond to any request or petition. It is suspected that the issue may be related to the connection with Ollama.

Temporary Solution:

To continue working on my project, I had to revert the changes made in the current version and go back to the previous version (1.1.5).

image

Reproduction of the problem:

The problem has been able to reproduce several times on my local machine.

Expected outcome:

I expect someone to be able to help me identify the source of the problem and provide a solution so that I can continue working with the latest version of OllamaSpring.

nurb2kea commented 2 weeks ago

I can confirm the issue with LLaMA3.1. (even after new pull request) LLaMA3.1 itself runs with all other apps OK.

When using other ollama LLMs they work fine.

CrazyNeil commented 2 weeks ago

Description:

I am experiencing issues with running the OllamaSpring application on my local machine. The details of the problem are as follows:

  • Application: OllamaSpring
  • Affected Version: Latest version 1.1.6
  • Model: LLaMA3.1
  • Operating System: macOS

Problem:

When attempting to run the application, it loads correctly but does not respond to any request or petition. It is suspected that the issue may be related to the connection with Ollama.

Temporary Solution:

To continue working on my project, I had to revert the changes made in the current version and go back to the previous version (1.1.5). image

Reproduction of the problem:

The problem has been able to reproduce several times on my local machine.

Expected outcome:

I expect someone to be able to help me identify the source of the problem and provide a solution so that I can continue working with the latest version of OllamaSpring.

This bug is caused by the role setting sequence in the messages param during the api request.

curl http://localhost:11434/api/chat -d '{
  "model": "llama3",
  "stream": false,
  "messages": [
    {
      "role": "user",
      "content": "why is the sky blue?"
    },
    {
      "role": "system",
      "content": "you are a help assistant and answer the question in english"
    }
  ]
}'

response

{"model":"llama3","created_at":"2024-08-31T01:41:26.740771Z","message":{"role":"assistant","content":""},"done_reason":"stop","done":true,"total_duration":375656166,"load_duration":37633791,"prompt_eval_count":37,"prompt_eval_duration":336497000,"eval_count":1,"eval_duration":13000}

the right one should be

curl http://localhost:11434/api/chat -d '{
  "model": "llama3",
  "stream": false,
  "messages": [
    {
      "role": "system",
      "content": "you are a help assistant and answer the question in english"
    },
    {
      "role": "user",
      "content": "why is the sky blue?"
    }
  ]
}'

response

{"model":"llama3","created_at":"2024-08-31T01:41:23.656778Z","message":{"role":"assistant","content":"What a great question!\n\nThe sky appears blue because of a phenomenon called scattering, which occurs when sunlight interacts with tiny molecules of gases in the Earth's atmosphere, such as nitrogen (N2) and oxygen (O2).\n\nHere's what happens:\n\n1. Sunlight enters the Earth's atmosphere and is made up of all the colors of the visible spectrum, which we perceive as white light.\n2. When this white light encounters a molecule of gas, it scatters in all directions. This scattering effect is more pronounced for shorter wavelengths (like blue and violet) than longer wavelengths (like red and orange).\n3. As a result, the blue and violet colors are scattered in every direction and reach our eyes from all parts of the sky.\n4. The other colors with longer wavelengths, like red and orange, continue to travel in a more direct path to our eyes, reaching us only from a specific direction (i.e., the sun).\n5. When we look at the sky, our brain combines the scattered blue light from all directions, making it appear blue.\n\nThe exact shade of blue can vary depending on atmospheric conditions, such as:\n\n* Time of day: The sky tends to be more intensely blue during the middle of the day when the sun is overhead.\n* Atmospheric particles: Dust, pollution, and water vapor in the air can scatter light differently, changing the apparent color of the sky.\n* Altitude: As you go higher, the atmosphere becomes thinner, and the sky appears darker blue or even black.\n\nSo, to summarize, the sky appears blue because of the scattering of sunlight by tiny molecules in the Earth's atmosphere, which favors shorter wavelengths like blue and violet over longer wavelengths like red and orange."},"done_reason":"stop","done":true,"total_duration":12712437917,"load_duration":5351384708,"prompt_eval_count":32,"prompt_eval_duration":138317000,"eval_count":346,"eval_duration":7220774000}

this bug will be fixed in v1.1.7 sooner, thanks for reporting

CrazyNeil commented 2 weeks ago

update v1.1.7 has been released. You can download it from release page or just update it inside the OllamaSpring.

@antofalinux @nurb2kea