supported aliyun coding plan.
This commit is contained in:
@@ -5,7 +5,7 @@ from typing import Literal
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
from pydantic.alias_generators import to_camel
|
||||
from pydantic_settings import BaseSettings
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Base(BaseModel):
|
||||
@@ -198,23 +198,6 @@ class QQConfig(Base):
|
||||
) # Allowed user openids (empty = public access)
|
||||
|
||||
|
||||
class MatrixConfig(Base):
|
||||
"""Matrix (Element) channel configuration."""
|
||||
|
||||
enabled: bool = False
|
||||
homeserver: str = "https://matrix.org"
|
||||
access_token: str = ""
|
||||
user_id: str = "" # e.g. @bot:matrix.org
|
||||
device_id: str = ""
|
||||
e2ee_enabled: bool = True # end-to-end encryption support
|
||||
sync_stop_grace_seconds: int = 2 # graceful sync_forever shutdown timeout
|
||||
max_media_bytes: int = 20 * 1024 * 1024 # inbound + outbound attachment limit
|
||||
allow_from: list[str] = Field(default_factory=list)
|
||||
group_policy: Literal["open", "mention", "allowlist"] = "open"
|
||||
group_allow_from: list[str] = Field(default_factory=list)
|
||||
allow_room_mentions: bool = False
|
||||
|
||||
|
||||
class ChannelsConfig(Base):
|
||||
"""Configuration for chat channels."""
|
||||
|
||||
@@ -339,6 +322,20 @@ class MCPServerConfig(Base):
|
||||
tool_timeout: int = 30 # Seconds before a tool call is cancelled
|
||||
|
||||
|
||||
class TTSConfig(Base):
|
||||
"""Text-to-Speech configuration."""
|
||||
|
||||
provider: str = "edge_tts" # Default TTS provider
|
||||
voice: str = "en-US-ChristopherNeural" # Default voice
|
||||
speed: float = 1.0 # Voice speed multiplier
|
||||
|
||||
|
||||
class AudioConfig(Base):
|
||||
"""Audio configuration."""
|
||||
|
||||
tts: TTSConfig = Field(default_factory=TTSConfig)
|
||||
|
||||
|
||||
class ToolsConfig(Base):
|
||||
"""Tools configuration."""
|
||||
|
||||
@@ -356,6 +353,7 @@ class Config(BaseSettings):
|
||||
providers: ProvidersConfig = Field(default_factory=ProvidersConfig)
|
||||
gateway: GatewayConfig = Field(default_factory=GatewayConfig)
|
||||
tools: ToolsConfig = Field(default_factory=ToolsConfig)
|
||||
audio: AudioConfig = Field(default_factory=AudioConfig)
|
||||
|
||||
@property
|
||||
def workspace_path(self) -> Path:
|
||||
|
||||
Reference in New Issue
Block a user