mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-01 21:20:15 +00:00
Merge branch 'main' into enhance/browser_data_import
This commit is contained in:
commit
f224f0f3fb
15 changed files with 389 additions and 198 deletions
|
|
@ -49,6 +49,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() / ".eigent" / email_sanitized / ("project_" + data.project_id) / ("task_" + data.task_id) / "camel_logs"
|
||||
camel_log.mkdir(parents=True, exist_ok=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue