server icon indicating copy to clipboard operation
server copied to clipboard

Introduce LanguageModel OCP API

Open marcelklehr opened this issue 3 years ago • 0 comments

  • Resolves: #38578
  • Closes: #38059

Summary

This adds a LanguageModel namespace with an ILanguageModelManager that queries registered ILanguageModelProviders to either synchronously run or asynchronously schedule ILanguageModelTasks. When scheduled asynchronously, the tasks will be run in a background job and either a TaskFailedEvent or a TaskSuccessfulEvent is emitted with error message or the output, respectively. Currently implemented are two task types: SummarizeTask and FreePromptTask.

TODO

  • [ ] Ethical AI rating should be accessible somehow, preferably via info.xml
  • [ ] Setting default provider per task type
  • [x] ocs API with a polling endpoint to query the result
    • [x] db needs an output column and ILanguageModelTask probably also needs getters and setters for that
  • [x] make linters happy

Checklist

marcelklehr avatar Jun 16 '23 11:06 marcelklehr