File: providers.py

package info (click to toggle)
nc-py-api 0.19.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,320 kB
  • sloc: python: 12,415; makefile: 238; xml: 100; javascript: 56; sh: 14
file content (24 lines) | stat: -rw-r--r-- 786 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""Nextcloud API for AI Providers."""

from ..._session import AsyncNcSessionApp, NcSessionApp
from .task_processing import _AsyncTaskProcessingProviderAPI, _TaskProcessingProviderAPI


class ProvidersApi:
    """Class that encapsulates all AI Providers functionality."""

    task_processing: _TaskProcessingProviderAPI
    """TaskProcessing Provider API."""

    def __init__(self, session: NcSessionApp):
        self.task_processing = _TaskProcessingProviderAPI(session)


class AsyncProvidersApi:
    """Class that encapsulates all AI Providers functionality."""

    task_processing: _AsyncTaskProcessingProviderAPI
    """TaskProcessing Provider API."""

    def __init__(self, session: AsyncNcSessionApp):
        self.task_processing = _AsyncTaskProcessingProviderAPI(session)