Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions llm_web_kit/api/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def initialize(self):
pool_pre_ping=True,
pool_size=settings.db_pool_size,
max_overflow=settings.db_max_overflow,
pool_recycle=3600,
pool_use_lifo=True,
)

# 创建异步会话工厂
Expand Down
3 changes: 2 additions & 1 deletion llm_web_kit/api/models/db_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from datetime import datetime

from sqlalchemy import Column, DateTime, Integer, String, Text
from sqlalchemy.dialects.mysql import LONGTEXT
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()
Expand All @@ -19,7 +20,7 @@ class RequestLog(Base):
id = Column(Integer, primary_key=True, autoincrement=True, comment='主键ID')
request_id = Column(String(64), nullable=False, unique=True, index=True, comment='请求ID')
input_type = Column(String(32), nullable=False, comment='输入类型: html_content, url, file')
input_html = Column(Text, nullable=True, comment='输入HTML字符串')
input_html = Column(LONGTEXT, nullable=True, comment='输入HTML字符串')
url = Column(Text, nullable=True, comment='输入URL地址')
output_markdown = Column(Text, nullable=True, comment='输出Markdown内容')
status = Column(String(32), default='processing', nullable=False, comment='状态: processing-处理中, success-成功, fail-失败')
Expand Down
2 changes: 1 addition & 1 deletion llm_web_kit/api/routers/htmls.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async def upload_html_file(
except Exception as commit_error:
logger.error(f'提交初始日志时出错: {commit_error}')

result = await html_service.parse_html(html_content=html_content)
result = await html_service.parse_html(html_content=html_content, url="www.baidu.com")

# 更新日志为成功
await RequestLogService.update_log_success(
Expand Down