77
88from typing import Generic , Literal , TypeVar
99
10- from pydantic import BaseModel
11- from pydantic import Field as pydantic_Field
10+ from pydantic import BaseModel , Field
1211
1312from graphrag .config .enums import InputFileType , InputType
1413from graphrag .index .config .workflow import PipelineWorkflowStep
@@ -22,49 +21,47 @@ class PipelineInputConfig(BaseModel, Generic[T]):
2221 file_type : T
2322 """The file type of input."""
2423
25- type : InputType | None = pydantic_Field (
24+ type : InputType | None = Field (
2625 description = "The input type to use." ,
2726 default = None ,
2827 )
2928 """The input type to use."""
3029
31- connection_string : str | None = pydantic_Field (
30+ connection_string : str | None = Field (
3231 description = "The blob cache connection string for the input files." ,
3332 default = None ,
3433 )
3534 """The blob cache connection string for the input files."""
3635
37- storage_account_blob_url : str | None = pydantic_Field (
36+ storage_account_blob_url : str | None = Field (
3837 description = "The storage account blob url for the input files." , default = None
3938 )
4039 """The storage account blob url for the input files."""
4140
42- container_name : str | None = pydantic_Field (
41+ container_name : str | None = Field (
4342 description = "The container name for input files." , default = None
4443 )
4544 """The container name for the input files."""
4645
47- base_dir : str | None = pydantic_Field (
46+ base_dir : str | None = Field (
4847 description = "The base directory for the input files." , default = None
4948 )
5049 """The base directory for the input files."""
5150
52- file_pattern : str = pydantic_Field (
53- description = "The regex file pattern for the input files."
54- )
51+ file_pattern : str = Field (description = "The regex file pattern for the input files." )
5552 """The regex file pattern for the input files."""
5653
57- file_filter : dict [str , str ] | None = pydantic_Field (
54+ file_filter : dict [str , str ] | None = Field (
5855 description = "The optional file filter for the input files." , default = None
5956 )
6057 """The optional file filter for the input files."""
6158
62- post_process : list [PipelineWorkflowStep ] | None = pydantic_Field (
59+ post_process : list [PipelineWorkflowStep ] | None = Field (
6360 description = "The post processing steps for the input." , default = None
6461 )
6562 """The post processing steps for the input."""
6663
67- encoding : str | None = pydantic_Field (
64+ encoding : str | None = Field (
6865 description = "The encoding for the input files." , default = None
6966 )
7067 """The encoding for the input files."""
@@ -75,28 +72,28 @@ class PipelineCSVInputConfig(PipelineInputConfig[Literal[InputFileType.csv]]):
7572
7673 file_type : Literal [InputFileType .csv ] = InputFileType .csv
7774
78- source_column : str | None = pydantic_Field (
75+ source_column : str | None = Field (
7976 description = "The column to use as the source of the document." , default = None
8077 )
8178 """The column to use as the source of the document."""
8279
83- timestamp_column : str | None = pydantic_Field (
80+ timestamp_column : str | None = Field (
8481 description = "The column to use as the timestamp of the document." , default = None
8582 )
8683 """The column to use as the timestamp of the document."""
8784
88- timestamp_format : str | None = pydantic_Field (
85+ timestamp_format : str | None = Field (
8986 description = "The format of the timestamp column, so it can be parsed correctly." ,
9087 default = None ,
9188 )
9289 """The format of the timestamp column, so it can be parsed correctly."""
9390
94- text_column : str | None = pydantic_Field (
91+ text_column : str | None = Field (
9592 description = "The column to use as the text of the document." , default = None
9693 )
9794 """The column to use as the text of the document."""
9895
99- title_column : str | None = pydantic_Field (
96+ title_column : str | None = Field (
10097 description = "The column to use as the title of the document." , default = None
10198 )
10299 """The column to use as the title of the document."""
@@ -108,7 +105,7 @@ class PipelineTextInputConfig(PipelineInputConfig[Literal[InputFileType.text]]):
108105 file_type : Literal [InputFileType .text ] = InputFileType .text
109106
110107 # Text Specific
111- title_text_length : int | None = pydantic_Field (
108+ title_text_length : int | None = Field (
112109 description = "Number of characters to use from the text as the title." ,
113110 default = None ,
114111 )
0 commit comments