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

Feat: add proofread provider #169

Merged
merged 3 commits into from
Jan 7, 2025
Merged

Feat: add proofread provider #169

merged 3 commits into from
Jan 7, 2025

Conversation

janepie
Copy link
Member

@janepie janepie commented Dec 19, 2024

No description provided.

@janepie janepie force-pushed the feat/add-proofread-provider branch 4 times, most recently from 496b9eb to 796ac57 Compare December 20, 2024 13:43
@janepie janepie marked this pull request as ready for review December 20, 2024 13:51
@janepie
Copy link
Member Author

janepie commented Dec 20, 2024

Do I guess correctly that psalm will run as soon as /~https://github.com/nextcloud-deps/ocp will be updated?

@janepie janepie force-pushed the feat/add-proofread-provider branch from 796ac57 to 16597e0 Compare December 20, 2024 14:08
Copy link

github-actions bot commented Jan 3, 2025

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@janepie janepie force-pushed the feat/add-proofread-provider branch from 16597e0 to 2da1407 Compare January 7, 2025 09:42
@janepie janepie requested a review from marcelklehr January 7, 2025 12:35
@@ -105,6 +106,9 @@ public function register(IRegistrationContext $context): void {
if (class_exists('OCP\\TaskProcessing\\TaskTypes\\TextToTextChatWithTools')) {
$context->registerTaskProcessingProvider(\OCA\OpenAi\TaskProcessing\TextToTextChatWithToolsProvider::class);
}
if (class_exists('OCP\\TaskProcessing\\TaskTypes\\TextToTextProofread')) {
$context->registerTaskProcessingProvider(ProofreadProvider::class);
Copy link
Member

Choose a reason for hiding this comment

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

I think you will need to put the full class path in this line, otherwise PHP will try to load the class when loading Application.php and then will try to load OCP\TaskProcessing\TaskTypes\TextToTextProofread which will fail and the whole app will fail. I'm not sure if this is still the case, but I think that was a problem I ran into a few times.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done :)

Signed-off-by: Jana Peper <jana.peper@nextcloud.com>
Signed-off-by: Jana Peper <jana.peper@nextcloud.com>
@janepie janepie force-pushed the feat/add-proofread-provider branch from 2da1407 to cc8e936 Compare January 7, 2025 13:56
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc force-pushed the feat/add-proofread-provider branch from 944cef9 to d554856 Compare January 7, 2025 15:51
Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

Works fine!

I tried to change the system prompt to force the llm to write correction recommendations in the same language as the submitted text but i couldn't get it to work.

I hope you don't mind, I made a small change to use the system prompt param of OpenAiAPIService::createChatCompletion.

@julien-nc julien-nc merged commit e635b55 into main Jan 7, 2025
7 checks passed
@julien-nc julien-nc mentioned this pull request Jan 7, 2025
@janepie janepie deleted the feat/add-proofread-provider branch January 7, 2025 16:15
@marcelklehr
Copy link
Member

I tried to change the system prompt to force the llm to write correction recommendations in the same language as the submitted text but i couldn't get it to work

Mh, that's not ideal, we should fix this at some point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants