Skip to content

Conversation

@ZoneTwelve
Copy link

This PR adds an Ollama Rephrase service to rephrase text using Ollama, utilizing a built-in default prompt. This implementation is based on option 2 of issue #1072.

What changed

  • Added a new localized string key ollama_rephrase for display name (en / sk / zh-Hans / zh-Hant).

  • Registered a new service mapping in QueryServiceFactory:

  • Implemented OllamaRephraseService (subclass of OllamaService) with:

    • Custom service name (NSLocalizedString("ollama_rephrase", ...))

    • Service type .ollamaRephrase

    • Stream configuration UI with translation/sentence/dictionary toggles and API key section hidden

    • Default rephrase prompts when custom prompt is disabled:

      • System: writing assistant instruction, return only rephrased text
      • User: “Rephrase the following text…” wrapper

Notes

  • Sentence and dictionary are disabled by default for this service to keep behavior focused on rephrasing.
  • Objective-C enum constants updated to include EZServiceTypeOllamaRephrase.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello ZoneTwelve, Thank you for your first PR contribution 🎉 ZoneTwelve

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.

1 participant