82 lines
1.3 KiB
Python
Raw Permalink Normal View History

2024-06-26 15:45:06 -04:00
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from typing import (
Any,
List,
)
from pydantic import BaseModel
class BaseResponse(BaseModel):
status: str
class ClaimResponse(BaseModel):
covariate_type: str
type: str
description: str
subject_id: str
object_id: str
source_text: str
text_unit_id: str
document_ids: List[str]
class EntityResponse(BaseModel):
name: str
description: str
text_units: list[str]
class GraphRequest(BaseModel):
index_name: str
2024-06-26 15:45:06 -04:00
query: str
2024-10-01 17:26:04 -04:00
community_level: int | None = None
2024-06-26 15:45:06 -04:00
class GraphResponse(BaseModel):
result: Any
context_data: Any
2024-06-26 15:45:06 -04:00
class GraphDataResponse(BaseModel):
nodes: int
edges: int
class IndexNameList(BaseModel):
index_name: List[str]
class IndexStatusResponse(BaseModel):
status_code: int
index_name: str
storage_name: str
status: str
percent_complete: float
progress: str
class ReportResponse(BaseModel):
text: str
class RelationshipResponse(BaseModel):
source: str
source_id: int
target: str
target_id: int
description: str
text_units: list[str]
class StorageNameList(BaseModel):
storage_name: List[str]
class TextUnitResponse(BaseModel):
text: str
source_document: str