cognigy-api-client 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cognigy/__init__.py +26 -0
- cognigy/async_client.py +117 -0
- cognigy/client.py +117 -0
- cognigy/exceptions.py +39 -0
- cognigy/models/__init__.py +275 -0
- cognigy/models/aiagent.py +781 -0
- cognigy/models/analytics.py +178 -0
- cognigy/models/base.py +36 -0
- cognigy/models/connection.py +260 -0
- cognigy/models/conversation.py +373 -0
- cognigy/models/extension.py +137 -0
- cognigy/models/flow.py +444 -0
- cognigy/models/function.py +225 -0
- cognigy/models/knowledge_chunk.py +233 -0
- cognigy/models/knowledge_connector.py +324 -0
- cognigy/models/knowledge_source.py +371 -0
- cognigy/models/knowledge_store.py +229 -0
- cognigy/models/llm.py +187 -0
- cognigy/models/locale.py +332 -0
- cognigy/models/log.py +91 -0
- cognigy/models/node.py +646 -0
- cognigy/models/project.py +542 -0
- cognigy/models/search.py +287 -0
- cognigy/models/snapshot.py +281 -0
- cognigy/models/task.py +262 -0
- cognigy/pagination.py +110 -0
- cognigy/py.typed +0 -0
- cognigy/resources/__init__.py +60 -0
- cognigy/resources/aiagents.py +575 -0
- cognigy/resources/analytics.py +328 -0
- cognigy/resources/connections.py +464 -0
- cognigy/resources/conversations.py +272 -0
- cognigy/resources/extensions.py +360 -0
- cognigy/resources/flows.py +483 -0
- cognigy/resources/functions.py +454 -0
- cognigy/resources/knowledge_chunks.py +577 -0
- cognigy/resources/knowledge_connectors.py +579 -0
- cognigy/resources/knowledge_sources.py +570 -0
- cognigy/resources/knowledge_stores.py +476 -0
- cognigy/resources/llm.py +255 -0
- cognigy/resources/locales.py +451 -0
- cognigy/resources/logs.py +368 -0
- cognigy/resources/nodes.py +876 -0
- cognigy/resources/projects.py +446 -0
- cognigy/resources/search.py +302 -0
- cognigy/resources/snapshots.py +682 -0
- cognigy/resources/tasks.py +358 -0
- cognigy/validation.py +125 -0
- cognigy_api_client-0.1.0.dist-info/METADATA +666 -0
- cognigy_api_client-0.1.0.dist-info/RECORD +53 -0
- cognigy_api_client-0.1.0.dist-info/WHEEL +5 -0
- cognigy_api_client-0.1.0.dist-info/licenses/LICENSE +21 -0
- cognigy_api_client-0.1.0.dist-info/top_level.txt +1 -0
cognigy/__init__.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from .client import CognigyClient
|
|
2
|
+
from .async_client import AsyncCognigyClient
|
|
3
|
+
from .exceptions import (
|
|
4
|
+
CognigyError,
|
|
5
|
+
CognigyConfigurationError,
|
|
6
|
+
CognigyAPIError,
|
|
7
|
+
CognigyValidationError,
|
|
8
|
+
)
|
|
9
|
+
from . import models
|
|
10
|
+
from . import resources
|
|
11
|
+
|
|
12
|
+
# Re-export all models and resources
|
|
13
|
+
from .models import * # noqa: F401, F403
|
|
14
|
+
from .resources import * # noqa: F401, F403
|
|
15
|
+
|
|
16
|
+
Cognigy = CognigyClient
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"Cognigy",
|
|
20
|
+
"CognigyClient",
|
|
21
|
+
"AsyncCognigyClient",
|
|
22
|
+
"CognigyError",
|
|
23
|
+
"CognigyConfigurationError",
|
|
24
|
+
"CognigyAPIError",
|
|
25
|
+
"CognigyValidationError",
|
|
26
|
+
] + models.__all__ + resources.__all__
|
cognigy/async_client.py
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import os
|
|
3
|
+
import httpx
|
|
4
|
+
from typing import Optional
|
|
5
|
+
from .exceptions import CognigyConfigurationError, CognigyAPIError
|
|
6
|
+
|
|
7
|
+
logger = logging.getLogger(__name__)
|
|
8
|
+
|
|
9
|
+
class AsyncCognigyClient:
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
api_key: Optional[str] = None,
|
|
13
|
+
base_url: Optional[str] = None,
|
|
14
|
+
timeout: int = 60
|
|
15
|
+
):
|
|
16
|
+
self._api_key = api_key or os.getenv("COGNIGY_API_KEY")
|
|
17
|
+
if not self._api_key:
|
|
18
|
+
raise CognigyConfigurationError(
|
|
19
|
+
"API Key is required. Provide it as an argument or set COGNIGY_API_KEY environment variable."
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
self._base_url = base_url or os.getenv("COGNIGY_BASE_URL", "https://api-app.cognigy.ai")
|
|
23
|
+
if "api-" not in self._base_url.lower():
|
|
24
|
+
raise CognigyConfigurationError(
|
|
25
|
+
"Invalid base URL. Base URL must contain 'api-' in the domain name."
|
|
26
|
+
"Example: 'https://api-app.cognigy.ai' if you use the 'app.cognigy.ai' domain."
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
self.http_client: httpx.AsyncClient = httpx.AsyncClient(
|
|
30
|
+
base_url=self._base_url,
|
|
31
|
+
headers={
|
|
32
|
+
"X-API-Key": self._api_key,
|
|
33
|
+
"Accept": "application/json",
|
|
34
|
+
},
|
|
35
|
+
timeout=timeout
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
# Initialize resources
|
|
39
|
+
from .resources.projects import AsyncProjectsResource
|
|
40
|
+
from .resources.flows import AsyncFlowsResource
|
|
41
|
+
from .resources.nodes import AsyncNodesResource
|
|
42
|
+
from .resources.aiagents import AsyncAIAgentsResource
|
|
43
|
+
from .resources.analytics import AsyncAnalyticsResource
|
|
44
|
+
from .resources.conversations import AsyncConversationsResource
|
|
45
|
+
from .resources.knowledge_stores import AsyncKnowledgeStoresResource
|
|
46
|
+
from .resources.knowledge_chunks import AsyncKnowledgeChunksResource
|
|
47
|
+
from .resources.knowledge_sources import AsyncKnowledgeSourcesResource
|
|
48
|
+
from .resources.knowledge_connectors import AsyncKnowledgeConnectorsResource
|
|
49
|
+
from .resources.locales import AsyncLocalesResource
|
|
50
|
+
from .resources.logs import AsyncLogsResource
|
|
51
|
+
from .resources.tasks import AsyncTasksResource
|
|
52
|
+
from .resources.search import AsyncSearchResource
|
|
53
|
+
from .resources.snapshots import AsyncSnapshotsResource
|
|
54
|
+
from .resources.extensions import AsyncExtensionsResource
|
|
55
|
+
from .resources.functions import AsyncFunctionsResource
|
|
56
|
+
from .resources.llm import AsyncLLMResource
|
|
57
|
+
from .resources.connections import AsyncConnectionsResource
|
|
58
|
+
|
|
59
|
+
self.projects: AsyncProjectsResource = AsyncProjectsResource(self)
|
|
60
|
+
self.flows: AsyncFlowsResource = AsyncFlowsResource(self)
|
|
61
|
+
self.nodes: AsyncNodesResource = AsyncNodesResource(self)
|
|
62
|
+
self.aiagents: AsyncAIAgentsResource = AsyncAIAgentsResource(self)
|
|
63
|
+
self.analytics: AsyncAnalyticsResource = AsyncAnalyticsResource(self)
|
|
64
|
+
self.conversations: AsyncConversationsResource = AsyncConversationsResource(self)
|
|
65
|
+
self.knowledge_stores: AsyncKnowledgeStoresResource = AsyncKnowledgeStoresResource(self)
|
|
66
|
+
self.knowledge_chunks: AsyncKnowledgeChunksResource = AsyncKnowledgeChunksResource(self)
|
|
67
|
+
self.knowledge_sources: AsyncKnowledgeSourcesResource = AsyncKnowledgeSourcesResource(self)
|
|
68
|
+
self.knowledge_connectors: AsyncKnowledgeConnectorsResource = AsyncKnowledgeConnectorsResource(self)
|
|
69
|
+
self.locales: AsyncLocalesResource = AsyncLocalesResource(self)
|
|
70
|
+
self.logs: AsyncLogsResource = AsyncLogsResource(self)
|
|
71
|
+
self.tasks: AsyncTasksResource = AsyncTasksResource(self)
|
|
72
|
+
self.search: AsyncSearchResource = AsyncSearchResource(self)
|
|
73
|
+
self.snapshots: AsyncSnapshotsResource = AsyncSnapshotsResource(self)
|
|
74
|
+
self.extensions: AsyncExtensionsResource = AsyncExtensionsResource(self)
|
|
75
|
+
self.functions: AsyncFunctionsResource = AsyncFunctionsResource(self)
|
|
76
|
+
self.llm: AsyncLLMResource = AsyncLLMResource(self)
|
|
77
|
+
self.connections: AsyncConnectionsResource = AsyncConnectionsResource(self)
|
|
78
|
+
|
|
79
|
+
async def close(self):
|
|
80
|
+
await self.http_client.aclose()
|
|
81
|
+
|
|
82
|
+
async def __aenter__(self):
|
|
83
|
+
return self
|
|
84
|
+
|
|
85
|
+
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
|
86
|
+
await self.close()
|
|
87
|
+
|
|
88
|
+
async def _request(self, method: str, path: str, **kwargs):
|
|
89
|
+
# Serialize Pydantic model if passed as data parameter (JSON body).
|
|
90
|
+
# When ``files`` is set, ``data`` is left as multipart form fields.
|
|
91
|
+
if "data" in kwargs and "files" not in kwargs:
|
|
92
|
+
data = kwargs.pop("data")
|
|
93
|
+
if hasattr(data, "model_dump"):
|
|
94
|
+
kwargs["json"] = data.model_dump(by_alias=True, exclude_none=True)
|
|
95
|
+
else:
|
|
96
|
+
kwargs["json"] = data
|
|
97
|
+
|
|
98
|
+
response = await self.http_client.request(method, path, **kwargs)
|
|
99
|
+
if not response.is_success:
|
|
100
|
+
logger.debug("API error response: %s", response.text)
|
|
101
|
+
try:
|
|
102
|
+
response_body = response.json()
|
|
103
|
+
except Exception:
|
|
104
|
+
response_body = response.text or None
|
|
105
|
+
raise CognigyAPIError(
|
|
106
|
+
message=f"API request failed: {response.reason_phrase}",
|
|
107
|
+
status_code=response.status_code,
|
|
108
|
+
response_body=response_body
|
|
109
|
+
)
|
|
110
|
+
# Cognigy update endpoints may return 204 No Content or empty body
|
|
111
|
+
if response.status_code == 204 or not response.text.strip():
|
|
112
|
+
return None
|
|
113
|
+
try:
|
|
114
|
+
return response.json()
|
|
115
|
+
except Exception:
|
|
116
|
+
logger.debug("Failed to parse JSON response: %s", response.text)
|
|
117
|
+
raise
|
cognigy/client.py
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import os
|
|
3
|
+
import httpx
|
|
4
|
+
from typing import Optional
|
|
5
|
+
from .exceptions import CognigyConfigurationError, CognigyAPIError
|
|
6
|
+
|
|
7
|
+
logger = logging.getLogger(__name__)
|
|
8
|
+
|
|
9
|
+
class CognigyClient:
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
api_key: Optional[str] = None,
|
|
13
|
+
base_url: Optional[str] = None,
|
|
14
|
+
timeout: int = 60
|
|
15
|
+
):
|
|
16
|
+
self._api_key = api_key or os.getenv("COGNIGY_API_KEY")
|
|
17
|
+
if not self._api_key:
|
|
18
|
+
raise CognigyConfigurationError(
|
|
19
|
+
"API Key is required. Provide it as an argument or set COGNIGY_API_KEY environment variable."
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
self._base_url = base_url or os.getenv("COGNIGY_BASE_URL", "https://api-app.cognigy.ai")
|
|
23
|
+
if "api-" not in self._base_url.lower() and "api.live.ai.telekomcloud.com" not in self._base_url.lower():
|
|
24
|
+
raise CognigyConfigurationError(
|
|
25
|
+
"Invalid base URL. Base URL must contain 'api-' in the domain name."
|
|
26
|
+
"Example: 'https://api-app.cognigy.ai' if you use the 'app.cognigy.ai' domain."
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
self.http_client: httpx.Client = httpx.Client(
|
|
30
|
+
base_url=self._base_url,
|
|
31
|
+
headers={
|
|
32
|
+
"X-API-Key": self._api_key,
|
|
33
|
+
"Accept": "application/json",
|
|
34
|
+
},
|
|
35
|
+
timeout=timeout
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
# Initialize resources
|
|
39
|
+
from .resources.projects import ProjectsResource
|
|
40
|
+
from .resources.flows import FlowsResource
|
|
41
|
+
from .resources.nodes import NodesResource
|
|
42
|
+
from .resources.aiagents import AIAgentsResource
|
|
43
|
+
from .resources.analytics import AnalyticsResource
|
|
44
|
+
from .resources.conversations import ConversationsResource
|
|
45
|
+
from .resources.knowledge_stores import KnowledgeStoresResource
|
|
46
|
+
from .resources.knowledge_chunks import KnowledgeChunksResource
|
|
47
|
+
from .resources.knowledge_sources import KnowledgeSourcesResource
|
|
48
|
+
from .resources.knowledge_connectors import KnowledgeConnectorsResource
|
|
49
|
+
from .resources.locales import LocalesResource
|
|
50
|
+
from .resources.logs import LogsResource
|
|
51
|
+
from .resources.tasks import TasksResource
|
|
52
|
+
from .resources.search import SearchResource
|
|
53
|
+
from .resources.snapshots import SnapshotsResource
|
|
54
|
+
from .resources.extensions import ExtensionsResource
|
|
55
|
+
from .resources.functions import FunctionsResource
|
|
56
|
+
from .resources.llm import LLMResource
|
|
57
|
+
from .resources.connections import ConnectionsResource
|
|
58
|
+
|
|
59
|
+
self.projects: ProjectsResource = ProjectsResource(self)
|
|
60
|
+
self.flows: FlowsResource = FlowsResource(self)
|
|
61
|
+
self.nodes: NodesResource = NodesResource(self)
|
|
62
|
+
self.aiagents: AIAgentsResource = AIAgentsResource(self)
|
|
63
|
+
self.analytics: AnalyticsResource = AnalyticsResource(self)
|
|
64
|
+
self.conversations: ConversationsResource = ConversationsResource(self)
|
|
65
|
+
self.knowledge_stores: KnowledgeStoresResource = KnowledgeStoresResource(self)
|
|
66
|
+
self.knowledge_chunks: KnowledgeChunksResource = KnowledgeChunksResource(self)
|
|
67
|
+
self.knowledge_sources: KnowledgeSourcesResource = KnowledgeSourcesResource(self)
|
|
68
|
+
self.knowledge_connectors: KnowledgeConnectorsResource = KnowledgeConnectorsResource(self)
|
|
69
|
+
self.locales: LocalesResource = LocalesResource(self)
|
|
70
|
+
self.logs: LogsResource = LogsResource(self)
|
|
71
|
+
self.tasks: TasksResource = TasksResource(self)
|
|
72
|
+
self.search: SearchResource = SearchResource(self)
|
|
73
|
+
self.snapshots: SnapshotsResource = SnapshotsResource(self)
|
|
74
|
+
self.extensions: ExtensionsResource = ExtensionsResource(self)
|
|
75
|
+
self.functions: FunctionsResource = FunctionsResource(self)
|
|
76
|
+
self.llm: LLMResource = LLMResource(self)
|
|
77
|
+
self.connections: ConnectionsResource = ConnectionsResource(self)
|
|
78
|
+
|
|
79
|
+
def close(self):
|
|
80
|
+
self.http_client.close()
|
|
81
|
+
|
|
82
|
+
def __enter__(self):
|
|
83
|
+
return self
|
|
84
|
+
|
|
85
|
+
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
86
|
+
self.close()
|
|
87
|
+
|
|
88
|
+
def _request(self, method: str, path: str, **kwargs):
|
|
89
|
+
# Serialize Pydantic model if passed as data parameter (JSON body).
|
|
90
|
+
# When ``files`` is set, ``data`` is left as multipart form fields.
|
|
91
|
+
if "data" in kwargs and "files" not in kwargs:
|
|
92
|
+
data = kwargs.pop("data")
|
|
93
|
+
if hasattr(data, "model_dump"):
|
|
94
|
+
kwargs["json"] = data.model_dump(by_alias=True, exclude_none=True)
|
|
95
|
+
else:
|
|
96
|
+
kwargs["json"] = data
|
|
97
|
+
|
|
98
|
+
response = self.http_client.request(method, path, **kwargs)
|
|
99
|
+
if not response.is_success:
|
|
100
|
+
logger.debug("API error response: %s", response.text)
|
|
101
|
+
try:
|
|
102
|
+
response_body = response.json()
|
|
103
|
+
except Exception:
|
|
104
|
+
response_body = response.text or None
|
|
105
|
+
raise CognigyAPIError(
|
|
106
|
+
message=f"API request failed: {response.reason_phrase}",
|
|
107
|
+
status_code=response.status_code,
|
|
108
|
+
response_body=response_body
|
|
109
|
+
)
|
|
110
|
+
# Cognigy update endpoints may return 204 No Content or empty body
|
|
111
|
+
if response.status_code == 204 or not response.text.strip():
|
|
112
|
+
return None
|
|
113
|
+
try:
|
|
114
|
+
return response.json()
|
|
115
|
+
except Exception:
|
|
116
|
+
logger.debug("Failed to parse JSON response: %s", response.text)
|
|
117
|
+
raise
|
cognigy/exceptions.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
class CognigyError(Exception):
|
|
2
|
+
"""Base exception for all Cognigy SDK errors."""
|
|
3
|
+
pass
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CognigyConfigurationError(CognigyError):
|
|
7
|
+
"""Raised when the client is not configured correctly (e.g. missing API key)."""
|
|
8
|
+
pass
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CognigyAPIError(CognigyError):
|
|
12
|
+
"""Raised when the Cognigy API returns an error response."""
|
|
13
|
+
def __init__(self, message: str, status_code: int, response_body=None):
|
|
14
|
+
detail = ""
|
|
15
|
+
if response_body and isinstance(response_body, dict) and response_body.get("detail"):
|
|
16
|
+
detail = f" - {response_body.get('detail')}"
|
|
17
|
+
super().__init__(f"(Status: {status_code}) {message}{detail}")
|
|
18
|
+
self.status_code = status_code
|
|
19
|
+
self.response_body = response_body
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class CognigyValidationError(CognigyError):
|
|
23
|
+
"""Raised when create/update data fails validation against the expected Pydantic model."""
|
|
24
|
+
def __init__(self, message: str, errors: list = None):
|
|
25
|
+
super().__init__(message)
|
|
26
|
+
self.errors = errors or []
|
|
27
|
+
|
|
28
|
+
def __str__(self) -> str:
|
|
29
|
+
if not self.errors:
|
|
30
|
+
return self.args[0] if self.args else "Validation failed."
|
|
31
|
+
lines = [self.args[0] if self.args else "Validation failed:"]
|
|
32
|
+
for err in self.errors:
|
|
33
|
+
loc = " -> ".join(str(x) for x in err.get("loc", ()))
|
|
34
|
+
msg = err.get("msg", "")
|
|
35
|
+
ctx = err.get("ctx")
|
|
36
|
+
if ctx:
|
|
37
|
+
msg = f"{msg} (context: {ctx})"
|
|
38
|
+
lines.append(f" • {loc}: {msg}")
|
|
39
|
+
return "\n".join(lines)
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
from .project import (
|
|
2
|
+
Project,
|
|
3
|
+
ProjectCreate,
|
|
4
|
+
ProjectUpdate,
|
|
5
|
+
HandoverConfiguration,
|
|
6
|
+
CssColor,
|
|
7
|
+
CognigyColor,
|
|
8
|
+
ProjectLocale,
|
|
9
|
+
WhisperAssistConfiguration,
|
|
10
|
+
)
|
|
11
|
+
from .flow import (
|
|
12
|
+
Flow,
|
|
13
|
+
FlowCreate,
|
|
14
|
+
FlowUpdate,
|
|
15
|
+
FeedbackReport,
|
|
16
|
+
FeedbackReportFinding,
|
|
17
|
+
FeedbackReportInfo,
|
|
18
|
+
LowDataIntent,
|
|
19
|
+
)
|
|
20
|
+
from .aiagent import (
|
|
21
|
+
AIAgent,
|
|
22
|
+
AIAgentCreate,
|
|
23
|
+
AIAgentUpdate,
|
|
24
|
+
AIAgentJob,
|
|
25
|
+
AIAgentTool,
|
|
26
|
+
AIAgentValidateNameRequest,
|
|
27
|
+
SpeakingStyle,
|
|
28
|
+
VoiceConfigs,
|
|
29
|
+
SafetySettings,
|
|
30
|
+
)
|
|
31
|
+
from .node import (
|
|
32
|
+
Node,
|
|
33
|
+
NodeCreate,
|
|
34
|
+
NodeMove,
|
|
35
|
+
NodeUpdate,
|
|
36
|
+
NodeMock,
|
|
37
|
+
NodeSearchMatch,
|
|
38
|
+
NodeSearchResult,
|
|
39
|
+
Chart,
|
|
40
|
+
ChartNodeSummary,
|
|
41
|
+
ChartRelation,
|
|
42
|
+
)
|
|
43
|
+
from .analytics import (
|
|
44
|
+
CallCounterMetric,
|
|
45
|
+
ConversationCounterMetric,
|
|
46
|
+
ChannelConversations,
|
|
47
|
+
)
|
|
48
|
+
from .conversation import (
|
|
49
|
+
Conversation,
|
|
50
|
+
ConversationMessage,
|
|
51
|
+
)
|
|
52
|
+
from .knowledge_store import (
|
|
53
|
+
KnowledgeStore,
|
|
54
|
+
KnowledgeStoreCreate,
|
|
55
|
+
KnowledgeStoreUpdate,
|
|
56
|
+
KnowledgeStoreStatus,
|
|
57
|
+
)
|
|
58
|
+
from .knowledge_chunk import (
|
|
59
|
+
KnowledgeChunk,
|
|
60
|
+
KnowledgeChunkCreate,
|
|
61
|
+
KnowledgeChunkUpdate,
|
|
62
|
+
)
|
|
63
|
+
from .knowledge_source import (
|
|
64
|
+
KnowledgeSource,
|
|
65
|
+
KnowledgeSourceCreate,
|
|
66
|
+
KnowledgeSourceUpdate,
|
|
67
|
+
KnowledgeSourceType,
|
|
68
|
+
KnowledgeSourceStatus,
|
|
69
|
+
KnowledgeSourceMetaData,
|
|
70
|
+
)
|
|
71
|
+
from .knowledge_connector import (
|
|
72
|
+
KnowledgeConnector,
|
|
73
|
+
KnowledgeConnectorCreate,
|
|
74
|
+
KnowledgeConnectorUpdate,
|
|
75
|
+
KnowledgeConnectorExecutionStatus,
|
|
76
|
+
ConnectorSchedule,
|
|
77
|
+
)
|
|
78
|
+
from .locale import (
|
|
79
|
+
Locale,
|
|
80
|
+
LocaleCreate,
|
|
81
|
+
LocaleUpdate,
|
|
82
|
+
NluLanguage,
|
|
83
|
+
)
|
|
84
|
+
from .log import (
|
|
85
|
+
LogEntry,
|
|
86
|
+
)
|
|
87
|
+
from .task import (
|
|
88
|
+
Task,
|
|
89
|
+
TaskStatus,
|
|
90
|
+
)
|
|
91
|
+
from .search import (
|
|
92
|
+
SearchResult,
|
|
93
|
+
SearchResultType,
|
|
94
|
+
NLUConnectorSubType,
|
|
95
|
+
EndpointSubType,
|
|
96
|
+
GenerativeAIProviderSubType,
|
|
97
|
+
)
|
|
98
|
+
from .snapshot import (
|
|
99
|
+
Snapshot,
|
|
100
|
+
SnapshotCreate,
|
|
101
|
+
SnapshotResource,
|
|
102
|
+
SnapshotDownloadLink,
|
|
103
|
+
SnapshotRestoreRequest,
|
|
104
|
+
SnapshotDownloadLinkRequest,
|
|
105
|
+
)
|
|
106
|
+
from .extension import (
|
|
107
|
+
Extension,
|
|
108
|
+
ExtensionBackgroundTask,
|
|
109
|
+
ExtensionListItem,
|
|
110
|
+
ExtensionSettingsUpdate,
|
|
111
|
+
ExtensionUpdatePackageByUrl,
|
|
112
|
+
ExtensionUploadByUrl,
|
|
113
|
+
)
|
|
114
|
+
from .function import (
|
|
115
|
+
Function,
|
|
116
|
+
FunctionCreate,
|
|
117
|
+
FunctionUpdate,
|
|
118
|
+
)
|
|
119
|
+
from .llm import (
|
|
120
|
+
LLM,
|
|
121
|
+
LLMCreate,
|
|
122
|
+
LLMCreateForOrganisation,
|
|
123
|
+
LLMCreateForProject,
|
|
124
|
+
LLMTestResult,
|
|
125
|
+
LLMUpdate,
|
|
126
|
+
)
|
|
127
|
+
from .connection import (
|
|
128
|
+
Connection,
|
|
129
|
+
ConnectionBatchCreateOp,
|
|
130
|
+
ConnectionBatchCreateValue,
|
|
131
|
+
ConnectionBatchDeleteOp,
|
|
132
|
+
ConnectionBatchOperation,
|
|
133
|
+
ConnectionBatchRequest,
|
|
134
|
+
ConnectionBatchResult,
|
|
135
|
+
ConnectionBatchUpdateOp,
|
|
136
|
+
ConnectionBatchUpdateValue,
|
|
137
|
+
ConnectionCreate,
|
|
138
|
+
ConnectionFieldCreate,
|
|
139
|
+
ConnectionListItem,
|
|
140
|
+
ConnectionSchemaItem,
|
|
141
|
+
ConnectionSchemaRef,
|
|
142
|
+
ConnectionUpdate,
|
|
143
|
+
ResourceLevel,
|
|
144
|
+
)
|
|
145
|
+
from .base import CognigyBaseModel
|
|
146
|
+
|
|
147
|
+
__all__ = [
|
|
148
|
+
# Base
|
|
149
|
+
"CognigyBaseModel",
|
|
150
|
+
# Project models
|
|
151
|
+
"Project",
|
|
152
|
+
"ProjectCreate",
|
|
153
|
+
"ProjectUpdate",
|
|
154
|
+
"HandoverConfiguration",
|
|
155
|
+
"CssColor",
|
|
156
|
+
"CognigyColor",
|
|
157
|
+
"ProjectLocale",
|
|
158
|
+
"WhisperAssistConfiguration",
|
|
159
|
+
# Flow models
|
|
160
|
+
"Flow",
|
|
161
|
+
"FlowCreate",
|
|
162
|
+
"FlowUpdate",
|
|
163
|
+
"FeedbackReport",
|
|
164
|
+
"FeedbackReportFinding",
|
|
165
|
+
"FeedbackReportInfo",
|
|
166
|
+
"LowDataIntent",
|
|
167
|
+
# AI Agent models
|
|
168
|
+
"AIAgent",
|
|
169
|
+
"AIAgentCreate",
|
|
170
|
+
"AIAgentUpdate",
|
|
171
|
+
"AIAgentJob",
|
|
172
|
+
"AIAgentTool",
|
|
173
|
+
"AIAgentValidateNameRequest",
|
|
174
|
+
"SpeakingStyle",
|
|
175
|
+
"VoiceConfigs",
|
|
176
|
+
"SafetySettings",
|
|
177
|
+
# Node models
|
|
178
|
+
"Node",
|
|
179
|
+
"NodeCreate",
|
|
180
|
+
"NodeMove",
|
|
181
|
+
"NodeUpdate",
|
|
182
|
+
"NodeMock",
|
|
183
|
+
"NodeSearchMatch",
|
|
184
|
+
"NodeSearchResult",
|
|
185
|
+
"Chart",
|
|
186
|
+
"ChartNodeSummary",
|
|
187
|
+
"ChartRelation",
|
|
188
|
+
# Analytics models
|
|
189
|
+
"CallCounterMetric",
|
|
190
|
+
"ConversationCounterMetric",
|
|
191
|
+
"ChannelConversations",
|
|
192
|
+
# Conversation models
|
|
193
|
+
"Conversation",
|
|
194
|
+
"ConversationMessage",
|
|
195
|
+
# KnowledgeStore models
|
|
196
|
+
"KnowledgeStore",
|
|
197
|
+
"KnowledgeStoreCreate",
|
|
198
|
+
"KnowledgeStoreUpdate",
|
|
199
|
+
"KnowledgeStoreStatus",
|
|
200
|
+
# KnowledgeChunk models
|
|
201
|
+
"KnowledgeChunk",
|
|
202
|
+
"KnowledgeChunkCreate",
|
|
203
|
+
"KnowledgeChunkUpdate",
|
|
204
|
+
# KnowledgeSource models
|
|
205
|
+
"KnowledgeSource",
|
|
206
|
+
"KnowledgeSourceCreate",
|
|
207
|
+
"KnowledgeSourceUpdate",
|
|
208
|
+
"KnowledgeSourceType",
|
|
209
|
+
"KnowledgeSourceStatus",
|
|
210
|
+
"KnowledgeSourceMetaData",
|
|
211
|
+
# KnowledgeConnector models
|
|
212
|
+
"KnowledgeConnector",
|
|
213
|
+
"KnowledgeConnectorCreate",
|
|
214
|
+
"KnowledgeConnectorUpdate",
|
|
215
|
+
"KnowledgeConnectorExecutionStatus",
|
|
216
|
+
"ConnectorSchedule",
|
|
217
|
+
# Locale models
|
|
218
|
+
"Locale",
|
|
219
|
+
"LocaleCreate",
|
|
220
|
+
"LocaleUpdate",
|
|
221
|
+
"NluLanguage",
|
|
222
|
+
# Log models
|
|
223
|
+
"LogEntry",
|
|
224
|
+
# Task models
|
|
225
|
+
"Task",
|
|
226
|
+
"TaskStatus",
|
|
227
|
+
# Search models
|
|
228
|
+
"SearchResult",
|
|
229
|
+
"SearchResultType",
|
|
230
|
+
"NLUConnectorSubType",
|
|
231
|
+
"EndpointSubType",
|
|
232
|
+
"GenerativeAIProviderSubType",
|
|
233
|
+
# Snapshot models
|
|
234
|
+
"Snapshot",
|
|
235
|
+
"SnapshotCreate",
|
|
236
|
+
"SnapshotResource",
|
|
237
|
+
"SnapshotDownloadLink",
|
|
238
|
+
"SnapshotRestoreRequest",
|
|
239
|
+
"SnapshotDownloadLinkRequest",
|
|
240
|
+
# Extension models
|
|
241
|
+
"Extension",
|
|
242
|
+
"ExtensionBackgroundTask",
|
|
243
|
+
"ExtensionListItem",
|
|
244
|
+
"ExtensionSettingsUpdate",
|
|
245
|
+
"ExtensionUpdatePackageByUrl",
|
|
246
|
+
"ExtensionUploadByUrl",
|
|
247
|
+
# Function models
|
|
248
|
+
"Function",
|
|
249
|
+
"FunctionCreate",
|
|
250
|
+
"FunctionUpdate",
|
|
251
|
+
# LLM models
|
|
252
|
+
"LLM",
|
|
253
|
+
"LLMCreate",
|
|
254
|
+
"LLMCreateForOrganisation",
|
|
255
|
+
"LLMCreateForProject",
|
|
256
|
+
"LLMTestResult",
|
|
257
|
+
"LLMUpdate",
|
|
258
|
+
# Connection models
|
|
259
|
+
"Connection",
|
|
260
|
+
"ConnectionBatchCreateOp",
|
|
261
|
+
"ConnectionBatchCreateValue",
|
|
262
|
+
"ConnectionBatchDeleteOp",
|
|
263
|
+
"ConnectionBatchOperation",
|
|
264
|
+
"ConnectionBatchRequest",
|
|
265
|
+
"ConnectionBatchResult",
|
|
266
|
+
"ConnectionBatchUpdateOp",
|
|
267
|
+
"ConnectionBatchUpdateValue",
|
|
268
|
+
"ConnectionCreate",
|
|
269
|
+
"ConnectionFieldCreate",
|
|
270
|
+
"ConnectionListItem",
|
|
271
|
+
"ConnectionSchemaItem",
|
|
272
|
+
"ConnectionSchemaRef",
|
|
273
|
+
"ConnectionUpdate",
|
|
274
|
+
"ResourceLevel",
|
|
275
|
+
]
|