mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-04 11:41:04 +02:00
fixed errors on import
This commit is contained in:
@ -97,6 +97,9 @@ class GraphInputs(BaseModel):
|
|||||||
files: list[InMemoryChatFile] | None = None
|
files: list[InMemoryChatFile] | None = None
|
||||||
structured_response_format: dict | None = None
|
structured_response_format: dict | None = None
|
||||||
|
|
||||||
|
class Config:
|
||||||
|
arbitrary_types_allowed = True
|
||||||
|
|
||||||
|
|
||||||
class GraphTooling(BaseModel):
|
class GraphTooling(BaseModel):
|
||||||
"""Tools and LLMs available to the graph"""
|
"""Tools and LLMs available to the graph"""
|
||||||
@ -108,6 +111,9 @@ class GraphTooling(BaseModel):
|
|||||||
force_use_tool: ForceUseTool
|
force_use_tool: ForceUseTool
|
||||||
using_tool_calling_llm: bool = False
|
using_tool_calling_llm: bool = False
|
||||||
|
|
||||||
|
class Config:
|
||||||
|
arbitrary_types_allowed = True
|
||||||
|
|
||||||
|
|
||||||
class GraphPersistence(BaseModel):
|
class GraphPersistence(BaseModel):
|
||||||
"""Configuration for data persistence"""
|
"""Configuration for data persistence"""
|
||||||
@ -117,6 +123,9 @@ class GraphPersistence(BaseModel):
|
|||||||
use_agentic_persistence: bool = True
|
use_agentic_persistence: bool = True
|
||||||
db_session: Session | None = None
|
db_session: Session | None = None
|
||||||
|
|
||||||
|
class Config:
|
||||||
|
arbitrary_types_allowed = True
|
||||||
|
|
||||||
@model_validator(mode="after")
|
@model_validator(mode="after")
|
||||||
def validate_db_session(self) -> "GraphPersistence":
|
def validate_db_session(self) -> "GraphPersistence":
|
||||||
if self.use_agentic_persistence and self.db_session is None:
|
if self.use_agentic_persistence and self.db_session is None:
|
||||||
|
Reference in New Issue
Block a user