import mlflow
# MLflow 실험 설정
mlflow.set_experiment("/Users/user@example.com/customer-support-agent")
# 에이전트 로깅
with mlflow.start_run():
model_info = mlflow.pyfunc.log_model(
artifact_path="agent",
python_model="agent.py", # 에이전트 코드 파일 경로
registered_model_name="catalog.schema.customer_support_agent",
pip_requirements=[
"langchain>=0.3.0",
"langchain-community>=0.3.0",
"databricks-sdk>=0.30.0",
],
input_example={
"messages": [
{"role": "user", "content": "주문 상태를 확인하고 싶습니다."}
]
}
)
print(f"Model URI: {model_info.model_uri}")