backend_settings
Backend settings module
Classes
APISettings
Bases: BaseDataModel
Eleanor Framework API settings
Attributes
fastapi
class-attribute
instance-attribute
fastapi: KwargsModel = Field(
..., description="FastAPI settings"
)
uvicorn
class-attribute
instance-attribute
uvicorn: KwargsModel = Field(
..., description="Uvicorn WSGI server settings"
)
BackendSettings
Bases: BaseDataModel
Backend API configuration settings
Attributes:
-
api_worker_pool
(int
) –Number of worker threads available to handle API requests
-
llm_bg_task_pool
(int
) –Number of workers threads in the LLM background task pool
-
jobs
(List[IoCFactoryModel]
) –Job factories that will be instantiated and run by the backend
-
images_dir
(str
) –Images directory
-
static_dir
(str
) –Static content directory
-
vector_store
(str
) –Vector store connection name
-
api
(APISettings
) –Eleanor Framework API settings
-
chat_completions
(ChatCompletionSettings
) –Chat completion APi settings
-
log_chat_requests
(bool
) –Write incoming chat message requests to the logs
-
log_chat_responses
(bool
) –Write outgoing chat message responses to the logs
-
log_chat_details
(bool
) –Write chat details to log
-
chain_invoke_max_tries
(int
) –Chain Invoke Max Tries
-
reduce_batch_size
(int
) –LLM Reduce Batch Size
-
langfuse_project_id
(str | None
) –Langfuse Project Identifier
-
langfuse_callback_kwargs
(KwargsModel
) –Additional arguments to pass to the Lang
Attributes
api_worker_pool
class-attribute
instance-attribute
api_worker_pool: int = Field(
10,
description="Number of worker threads available to handle API requests",
)
chain_invoke
class-attribute
instance-attribute
chain_invoke: ChainInvokeSettings = Field(
default_factory=ChainInvokeSettings, description=__doc__
)
chat_completions
class-attribute
instance-attribute
chat_completions: ChatCompletionSettings = Field(
default_factory=ChatCompletionSettings,
description=__doc__,
)
checkmate
class-attribute
instance-attribute
checkmate: CheckMateSettings = Field(
..., title="CheckMate Settings", description=__doc__
)
flexible_resource_matching
class-attribute
instance-attribute
flexible_resource_matching: bool = Field(
default=True,
title="Flexible Resource Matching",
description="Resource records such as Sessions, Collections, Users, and Agents managed by The EleanorAI Framework in that they all belong to a namespace, support soft deletes, and can be disabled. Moreover, in the RDBMS these records also have a name that is unique per namespace. This means that resources can be retrieved and referenced either by their PKID or by name. When enabled, this will enable flexible resource matching at the DAO-level for retrieving single record operations from the database. When this is set to false, PKIDs must be used",
)
graph_batch_chunk_size
class-attribute
instance-attribute
graph_batch_chunk_size: int = Field(
default=1000,
description="When performing batch/bulk operations on the graph database, this value controls the maximum size of each chunk",
)
graph_driver
class-attribute
instance-attribute
graph_driver: GraphDriverFactory = Field(
...,
description="Neo4J graph database driver factory settings",
)
graph_enabled
class-attribute
instance-attribute
graph_enabled: bool = Field(
default=False,
title="Graph Driver Enabled",
description="When true, graph database connection will be used",
)
images_dir
class-attribute
instance-attribute
jobs
class-attribute
instance-attribute
jobs: List[IoCFactoryModel] = Field(
default_factory=list,
title="Job Factories",
description="A list of job factories that will be instantiated and run by the backend. Jobs are automatically initialized by a Pydantic model validator and must use the normal IoCFactoryModel syntax (ex a dictionary with a class field and other arguments that get passed to the constructor). All instances must inherit from eleanor.backend.jobs.base.BaseJob or validation will fail. This field is volatile will be excluded from serialization.",
frozen=True,
)
langfuse_callback_kwargs
class-attribute
instance-attribute
langfuse_callback_kwargs: KwargsModel = Field(
...,
title="Langfuse Callback Handler",
description="Additional arguments to pass to the Langfuse callback handler",
)
langfuse_include_chain
class-attribute
instance-attribute
langfuse_include_chain: bool = Field(
default=True,
title="Langfuse Include Chain",
description="When true, the chain JSON will be added to LangFuse metadata, else this is disabled",
)
langfuse_limit_full_memory
class-attribute
instance-attribute
langfuse_limit_full_memory: int = Field(
default=40,
title="Langfuse Limit Full Memory",
description="Limits the number of full_memory entries returned by get_memories, effectively setting a cap in the number of memories sent to LangFuse",
)
langfuse_project_id
class-attribute
instance-attribute
langfuse_project_id: str | None = Field(
default=None,
title="Langfuse Project Identifier",
description="The unique LangFuse project identifier of the project used to trace LLM executions. When this value is not None, calls to the chain invoke service will log the URL to the trace to the Eleanor Framework logs.",
)
llm_bg_task_pool
class-attribute
instance-attribute
llm_bg_task_pool: int = Field(
10,
description="Number of workers threads in the LLM background task pool",
)
log_chat_details
class-attribute
instance-attribute
log_chat_details: bool = Field(
default=True,
title="Log Chat Operation Details",
description="Write chat details to log (may be verbose)",
)
log_chat_requests
class-attribute
instance-attribute
log_chat_requests: bool = Field(
default=True,
title="Log Chat Requests",
description="Write incoming chat message requests to the logs (may be verbose)",
)
log_chat_responses
class-attribute
instance-attribute
log_chat_responses: bool = Field(
default=True,
title="Log Chat Responses",
description="Write outgoing chat message responses to the logs (may be verbose)",
)
static_dir
class-attribute
instance-attribute
ChainInvokeSettings
Bases: BaseModel
Settings that control the behavior of the LangChain invoke service
Attributes:
-
recursion_limit
(int
) –Maximum number of times a call can recurse
-
max_concurrency
(int
) –Maximum number of parallel calls to make
Attributes
default_max_tries
class-attribute
instance-attribute
default_max_tries: int = Field(
default=1,
gt=0,
title="Chain Invoke Max Tries",
description="When executing chains via the chain invoke service, this value controls the default number of tries langchain will attempt before triggering a failure. Increasing this value > 1 can be an effective strategy to increase overall success when dealing with periodic LLM generation errors. A common use case for multiple tries is when a LLM periodically returns results that cannot be parsed by the chain's output parser.",
)
max_concurrency
class-attribute
instance-attribute
max_concurrency: int = Field(
default=10,
description="Maximum number of parallel calls to make, defaults to 10.",
)
ChatCompletionSettings
Bases: BaseDataModel
Chat completion APi settings
Attributes:
-
single_user_chat_patterns
(List[str]
) –Single user chat identification patterns
-
group_chat_patterns
(List[str]
) –Group chat identification patterns
CheckMateSettings
Bases: BaseModel
CheckMate task execution engine settings
Attributes
auto_cleanup
class-attribute
instance-attribute
auto_cleanup: bool = Field(
default=False,
title="Auto Cleanup",
description="Auto cleanup for task engine",
)
bind_lock_timeout
class-attribute
instance-attribute
bind_lock_timeout: float | None = Field(
default=None,
title="Bind Lock Timeout",
description="Bind lock timeout for task engine",
)
io_factory
class-attribute
instance-attribute
io_factory: IoCFactoryModel = Field(
...,
title="Task I/O",
description="Factory class for task persistence storage",
)
max_attempts
class-attribute
instance-attribute
max_attempts: int = Field(
default=1,
title="Max Attempts",
description="Maximum number of attempts for task engine",
)
retry_policy
class-attribute
instance-attribute
retry_policy: RetryPolicy = Field(
default=STAGE,
title="Retry Policy",
description="Retry policy for task engine",
)
GraphDriverFactory
Bases: BaseDataModel
Neo4j/Memgraph graph database client configuration settings & driver factory
Attributes:
-
password
(SecretStr
) –Graph database password
-
uri
(str
) –Neo4j/Memgraph database URI
-
user
(str
) –Neo4j/Memgraph database user
-
trust
(str | None
) –Path to certificate trust
-
kwargs
(KwargsModel
) –Additional Driver kwargs
Attributes
kwargs
class-attribute
instance-attribute
kwargs: KwargsModel = Field(
default_factory=KwargsModel,
description="Additional Driver kwargs",
)
password
class-attribute
instance-attribute
password: SecretStr = Field(
default_factory=lambda: SecretStr(""),
exclude=True,
description="Graph database password",
)