27 lines
710 B
Python
27 lines
710 B
Python
|
|
import os
|
|
import sys
|
|
from sqlalchemy import create_engine, text
|
|
|
|
# Add backend directory to path
|
|
sys.path.append(os.path.join(os.getcwd(), 'backend'))
|
|
|
|
from app import create_app, db
|
|
from app.models import Agent
|
|
|
|
app = create_app()
|
|
|
|
with app.app_context():
|
|
try:
|
|
agent = Agent.query.filter_by(name='人事规章').first()
|
|
if agent:
|
|
print(f"Agent Found: {agent.name}")
|
|
print(f"ID: {agent.id}")
|
|
print(f"Type: {agent.type}")
|
|
print(f"API Base URL: {agent.api_base_url}")
|
|
print(f"API Key: {agent.dify_api_key}")
|
|
else:
|
|
print("Agent '人事规章' not found.")
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|