Merge branch 'main' into add_timeout

This commit is contained in:
Wendong-Fan 2025-11-11 16:44:02 +08:00 committed by GitHub
commit 4adae03c89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
97 changed files with 9121 additions and 2032 deletions

View file

@ -88,6 +88,13 @@ async def post(data: Chat, request: Request):
os.environ["OPENAI_API_BASE_URL"] = data.api_url or "https://api.openai.com/v1"
os.environ["CAMEL_MODEL_LOG_ENABLED"] = "true"
# Set user-specific search engine configuration if provided
if data.search_config:
for key, value in data.search_config.items():
if value: # Only set non-empty values
os.environ[key] = value
chat_logger.info(f"Set search config: {key}", extra={"project_id": data.project_id})
email_sanitized = re.sub(r'[\\/*?:"<>|\s]', "_", data.email.split("@")[0]).strip(".")
camel_log = (
Path.home()