Closed nuaimat closed 9 months ago
This is rough. Is this a dev build? Can you try adding "-- --release" if so? That's really only kicking the problem down the road.
We might need to find a more creative and/or lower level solution.
Or maybe a self-monitoring / self-correction mechanism of some sort.
Other things to try....
retried compiling with
npm run tauri build '-- --release'
then installed the generated app
and started it via command line, still same issue, some characters are still missing when generating.
I added a new capability to paste the text after it finishes which won't have this problem. But that doesn't have the nice capability of real time streaming.
Another approach could be to pop up a window that it streams to, and then have an easy copy / paste. This would ensure nothing is missed.
whats strange is the generation text on terminal is fine, see: plock terminal output:
SELECTION: Some("Searches wikipedia for the given query, then returns the search results. This is a helper function.")
Whole output: def wiki_search(query):
from bs4 import BeautifulSoup
import requests
url = f"https://en.wikipedia.org/wiki/Special:Search/{query}"
response = requests.get(url)
soup = BeautifulSoup(response.text, "html.parser")
return soup.find_all("h3")[1:]
text output in a text editor:
def wiki_search(query):
from bs4 import BeautifulSoup
import requests
url = f"https://en.wikipedia.org/wiki/Special:Search/{query}"
response = requests.get(url)
soup = Beautifuloup(response.tex, "html.parse")
return sou.find_all(h3")[:]
notice "Beautifuloup" is misspelled inside the IDE, but it's fine on the terminal.
i strongly believe this bug has to do with the way the code is fetching response from ollama -> display it on the gui
Sorry for not being clear- this is 100% enigo causing this issue. Like enigo::fast_text (now using enigo::text which calls it). I think it is either truncating incorrectly or getting io blocked and not confirming it outputted properly.
Happening to me too. Could you chunk the streaming and do a short sleep between chunks? Totally ignorant guess.
This fixed it for me...
do with it what you will...
@kengoodridge / @kgoodridge excited to review it- Welcome to developing plock- happy you’re here!
I believe this is fixed - going to cut a new version
Hello
in addition to the other issue i am facing (https://github.com/jasonjmcghee/plock/issues/9) whenever i generate text using either
cmd+shift+.
orcmd+shift+/
the generated text seems to be missing few characters from some words.notice that i am running plock + ollama : openhermes2.5-mistral
see these two examples
highlighted text: "what is the purpose of life" response:
The purpose of life is a subjective and philosophical question, with various perspectives based on cultural, religious, and personal beliefs. Some common themes include self-fulfilment, personal growh contributing positvely to societ, and finding meanig i relationships and xperiences. Ulimately, each indivdual mus determine their ow sense o purpose.
notice the misspelled words:highlighted text: "write a one line story about cryptocurrencies " response
As the world embrace digital currency, ryptocurencies soared an crashed like wavesin a unpredictable sea.
notice the misspelled words:it's strange that it doesn't happen on all cases. and i am not sure if it has to do with macos throttling typing of generated text or the code logic that transforms the ollama response stream.
asking the same questions to ollama directly:
ollama run openhermes2.5-mistral
what is the purpose of life
response:The purpose of life is a subjective and philosophical question that has been debated throughout human history. Different people, cultures, and belief systems offer various answers to this question. Some believe life's purpose is to seek happiness, personal growth, or self-fulfillment. Others may see it as serving a higher power, contributing to society, or finding meaning in relationships and experiences. Ultimately, the purpose of life depends on an individual's values, beliefs, and personal journey.
write a one line story about cryptocurrencies
response:In a world ravaged by economic turmoil, cryptocurrencies emerged as a revolutionary digital asset, transforming the financial landscape forever.