Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bc2/core/analyze/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from typing import Union

from .azuredi import AzureDIAnalyzeConfig

AnalyzeConfig = Union[AzureDIAnalyzeConfig,]
2 changes: 1 addition & 1 deletion bc2/core/analyze/azuredi.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class AzureDIAnalyzeConfig(BaseModel):
"""Azure DI Analyze config."""

engine: Literal["analyze:azuredi"]
engine: Literal["analyze:azuredi"] = "analyze:azuredi"
endpoint: str
api_key: str
# Todo: Add api_version, since we'll need to match what's on GovCloud,
Expand Down
6 changes: 6 additions & 0 deletions bc2/core/common/all.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import typing

from ..analyze import AnalyzeConfig
from ..extract import ExtractConfig
from ..input import InputConfig
from ..inspect import InspectConfig
from ..ontology import OntologyConfig
Comment thread
jnu marked this conversation as resolved.
from ..output import OutputConfig
from ..paint import PaintConfig
from ..parse import ParseConfig
from ..redact import RedactConfig
from ..render import RenderConfig
Expand All @@ -14,7 +17,10 @@
]

AnyProcessingConfig = typing.Union[
AnalyzeConfig,
ExtractConfig,
OntologyConfig,
PaintConfig,
RedactConfig,
InspectConfig,
ParseConfig,
Expand Down
5 changes: 5 additions & 0 deletions bc2/core/ontology/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from typing import Union

from .openai import OpenAIOntologyConfig

OntologyConfig = Union[OpenAIOntologyConfig,]
2 changes: 1 addition & 1 deletion bc2/core/ontology/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class OpenAIOntologyConfig(OpenAIConfig):
"""OpenAI Ontology config."""

engine: Literal["ontology:openai"]
engine: Literal["ontology:openai"] = "ontology:openai"
generator: OpenAIChatConfig[PoliceReport]

@cached_property
Expand Down
5 changes: 5 additions & 0 deletions bc2/core/paint/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from typing import Union

from .ontology import OntologyPainterConfig

PaintConfig = Union[OntologyPainterConfig,]
Loading