mirror of
https://github.com/langgenius/dify.git
synced 2025-08-31 04:25:44 +00:00

Co-authored-by: haokai <haokai@shuwen.com> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: Bowen Liang <bowenliang@apache.org> Co-authored-by: wellCh4n <wellCh4n@foxmail.com>
31 lines
700 B
Python
31 lines
700 B
Python
from typing import Optional
|
|
|
|
from pydantic import Field, PositiveInt
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class ElasticsearchConfig(BaseSettings):
|
|
"""
|
|
Elasticsearch configs
|
|
"""
|
|
|
|
ELASTICSEARCH_HOST: Optional[str] = Field(
|
|
description="Elasticsearch host",
|
|
default="127.0.0.1",
|
|
)
|
|
|
|
ELASTICSEARCH_PORT: PositiveInt = Field(
|
|
description="Elasticsearch port",
|
|
default=9200,
|
|
)
|
|
|
|
ELASTICSEARCH_USERNAME: Optional[str] = Field(
|
|
description="Elasticsearch username",
|
|
default="elastic",
|
|
)
|
|
|
|
ELASTICSEARCH_PASSWORD: Optional[str] = Field(
|
|
description="Elasticsearch password",
|
|
default="elastic",
|
|
)
|