mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-27 17:08:47 +00:00
community[patch]: Fix validation error in SettingsConfigDict across multiple Langchain modules (#26852)
- **Description:** This pull request addresses the validation error in `SettingsConfigDict` due to extra fields in the `.env` file. The issue is prevalent across multiple Langchain modules. This fix ensures that extra fields in the `.env` file are ignored, preventing validation errors. **Changes include:** - Applied fixes to modules using `SettingsConfigDict`. - **Issue:** NA, similar https://github.com/langchain-ai/langchain/issues/26850 - **Dependencies:** NA
This commit is contained in:
parent
d502858412
commit
51c4393298
@ -26,6 +26,7 @@ class _OneNoteGraphSettings(BaseSettings):
|
||||
populate_by_name=True,
|
||||
env_file=".env",
|
||||
env_prefix="MS_GRAPH_",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
|
||||
|
@ -62,7 +62,10 @@ class ApacheDorisSettings(BaseSettings):
|
||||
return getattr(self, item)
|
||||
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env", env_file_encoding="utf-8", env_prefix="apache_doris_"
|
||||
env_file=".env",
|
||||
env_file_encoding="utf-8",
|
||||
env_prefix="apache_doris_",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
|
||||
|
@ -96,7 +96,10 @@ class ClickhouseSettings(BaseSettings):
|
||||
return getattr(self, item)
|
||||
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env", env_file_encoding="utf-8", env_prefix="clickhouse_"
|
||||
env_file=".env",
|
||||
env_file_encoding="utf-8",
|
||||
env_prefix="clickhouse_",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
|
||||
|
@ -80,7 +80,10 @@ class KineticaSettings(BaseSettings):
|
||||
return getattr(self, item)
|
||||
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env", env_file_encoding="utf-8", env_prefix="kinetica_"
|
||||
env_file=".env",
|
||||
env_file_encoding="utf-8",
|
||||
env_prefix="kinetica_",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
|
||||
|
@ -57,7 +57,10 @@ class ManticoreSearchSettings(BaseSettings):
|
||||
return getattr(self, item)
|
||||
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env", env_file_encoding="utf-8", env_prefix="manticore_"
|
||||
env_file=".env",
|
||||
env_file_encoding="utf-8",
|
||||
env_prefix="manticore_",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
|
||||
|
@ -86,7 +86,10 @@ class MyScaleSettings(BaseSettings):
|
||||
return getattr(self, item)
|
||||
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env", env_file_encoding="utf-8", env_prefix="myscale_"
|
||||
env_file=".env",
|
||||
env_file_encoding="utf-8",
|
||||
env_prefix="myscale_",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
|
||||
|
@ -113,7 +113,10 @@ class StarRocksSettings(BaseSettings):
|
||||
return getattr(self, item)
|
||||
|
||||
model_config = SettingsConfigDict(
|
||||
env_file=".env", env_file_encoding="utf-8", env_prefix="starrocks_"
|
||||
env_file=".env",
|
||||
env_file_encoding="utf-8",
|
||||
env_prefix="starrocks_",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user