Skip to content

Fix Ollama support #2

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

Lord-Memester
Copy link

Yippee, Wahoo! Ollama works now, too! :P

jpierzchala and others added 4 commits March 21, 2025 10:26
• Added a new static method safe_open_clipboard that attempts to open the clipboard repeatedly (with configurable retries and delay) to handle transient access issues.
• Replaced direct win32clipboard.OpenClipboard calls in _paste_with_clipboard_preservation with safe_open_clipboard to safely preserve and later restore clipboard data.
• Updated win32clipboard.SetClipboardText to use the CF_UNICODETEXT flag to ensure proper Unicode formatting.
• Wrapped the clipboard closing calls in a try/except block to guarantee cleanup even if errors occur.
• Added error messages if the clipboard cannot be opened for preservation or restoration.

These changes improve the robustness and reliability of clipboard operations during simulated input actions.
…tion

Body:
Previously, when reading a file in the settings window the file's content was appended to the existing text in the text editor. This led to unexpected modifications of the displayed text. With this change, the editor now retains its current text without appending additional content from the file. File contents are only appended for the api call.
…or gpt-4o-transcribe

Body:
• Update config_schema.yaml to include a new transcription model option, gpt-4o-transcribe.
• Modify transcription.py to obtain the model from api_options instead of hardcoding "whisper-1".
• Update the logging message to reflect the chosen model, ensuring transparency during API requests.

These changes enable dynamic selection of OpenAI transcription models based on the configuration.
The program was looking for an API key that Ollama doesn't have since it's local. I fixed it. I have no experience writing Python code, so this might break something else but for the time being it fixes the issue I had.

(For example, this description was spellchecked by `airat/karen-the-editor-v2-strict:latest`!)
@Lord-Memester
Copy link
Author

Lord-Memester commented Mar 21, 2025

I also disabled :latest being removed from the model names because I didn't see any reason for that to be happening, especially since those familiar with Ollama in the command prompt would probably assume the :latest would be included.

@Lord-Memester Lord-Memester changed the title Pr/1 Quick Fix for Ollama support Mar 26, 2025
@Lord-Memester Lord-Memester changed the title Quick Fix for Ollama support Fix Ollama support Mar 26, 2025
changed ollama api token to something less gaudy
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

Successfully merging this pull request may close these issues.

2 participants