-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgraph.py
More file actions
80 lines (53 loc) · 2.29 KB
/
graph.py
File metadata and controls
80 lines (53 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal
from .._models import BaseModel
__all__ = ["Graph", "FileStatus", "URL", "URLStatus"]
class FileStatus(BaseModel):
"""The processing status of files in the Knowledge Graph."""
completed: int
"""The number of files that have been successfully processed."""
failed: int
"""The number of files that failed to process."""
in_progress: int
"""The number of files currently being processed."""
total: int
"""The total number of files associated with the Knowledge Graph."""
class URLStatus(BaseModel):
"""The current status of the URL processing."""
status: Literal["validating", "success", "error"]
"""The current status of the URL processing."""
error_type: Optional[
Literal["invalid_url", "not_searchable", "not_found", "paywall_or_login_page", "unexpected_error"]
] = None
"""The type of error that occurred during processing, if any."""
class URL(BaseModel):
status: URLStatus
"""The current status of the URL processing."""
type: Literal["single_page", "sub_pages"]
"""The type of web connector processing for this URL."""
url: str
"""The URL to be processed by the web connector."""
exclude_urls: Optional[List[str]] = None
"""An array of URLs to exclude from processing within this web connector."""
class Graph(BaseModel):
id: str
"""The unique identifier of the Knowledge Graph."""
created_at: datetime
"""The timestamp when the Knowledge Graph was created."""
file_status: FileStatus
"""The processing status of files in the Knowledge Graph."""
name: str
"""The name of the Knowledge Graph."""
type: Literal["manual", "connector", "web"]
"""The type of Knowledge Graph.
- `manual`: files are uploaded via UI or API
- `connector`: files are uploaded via a data connector such as Google Drive or
Confluence
- `web`: URLs are connected to the Knowledge Graph
"""
description: Optional[str] = None
"""A description of the Knowledge Graph."""
urls: Optional[List[URL]] = None
"""An array of web connector URLs associated with this Knowledge Graph."""