api的system prompt独立出去,不要写在代码里面

This commit is contained in:
2025-02-16 10:58:56 +08:00
parent c3e560dfb8
commit 97c13d11fd
4 changed files with 129 additions and 120 deletions

View File

@@ -7,6 +7,7 @@ Contact: yt.li2@siat.ac.cn
import os
import boto3
import logging
import yaml
from typing import Optional, Dict
from pydantic import Field
from pydantic_settings import BaseSettings
@@ -69,4 +70,8 @@ def handle_minio_upload(file_path: str, file_name: str) -> str:
return url.replace(settings.internal_minio_endpoint or "", settings.minio_endpoint)
except Exception as e:
return handle_minio_error(e)
return handle_minio_error(e)
def load_agent_configs(config_path):
with open(config_path, 'r') as file:
return yaml.safe_load(file)