完善细节
This commit is contained in:
+3
-2
@@ -61,7 +61,7 @@ async def main():
|
||||
# MCP服务-ailab
|
||||
endpoint_url_ai_lab = "wss://ai.ronsunny.cn:8090/aimcp/mcp_endpoint/mcp/?token=TsSP9lBq6Oa1WMkachHoS2TtNt4GKV/Gli24pk5Rjpk%3D"
|
||||
# endpoint_url_ai_lab = "ws://ce_bot_mcp:8004/mcp_endpoint/mcp/?token=TsSP9lBq6Oa1WMkachHoS2TtNt4GKV/Gli24pk5Rjpk%3D"
|
||||
task_mcp1 = asyncio.create_task(init_mcp_server(endpoint_url_ai_lab))
|
||||
# task_mcp1 = asyncio.create_task(init_mcp_server(endpoint_url_ai_lab))
|
||||
|
||||
# MCP服务-ql
|
||||
endpoint_url_ql = "wss://ai.ronsunny.cn:8090/aimcp/mcp_endpoint/mcp/?token=8ZmCzp7FzsbxwHOg2%2FvBQkxrC3QWJiI%2B4iTfouExinjcT8ZgLwQfFUtgcMInI7St"
|
||||
@@ -70,7 +70,8 @@ async def main():
|
||||
# RabbitMQ服务
|
||||
task_mq = asyncio.create_task(mq_pull_analysis_async())
|
||||
|
||||
await asyncio.gather(task_api, task_mcp1, task_mcp2, task_mq)
|
||||
# await asyncio.gather(task_api, task_mcp1, task_mcp2, task_mq)
|
||||
await asyncio.gather(task_api, task_mcp2, task_mq)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -22,6 +22,13 @@ def push_file(bucket_name, object_name, file_bytes, contents, content_type):
|
||||
)
|
||||
|
||||
|
||||
def get_upload_token(bucket_name, object_name, xpires=timedelta(hours=1)):
|
||||
upload_url = minio_client.presigned_put_object(
|
||||
bucket_name=bucket_name, object_name=object_name, expires=xpires
|
||||
)
|
||||
return {"upload_url": upload_url, "object_name": object_name}
|
||||
|
||||
|
||||
def get_temp_url(bucket_name, object_name):
|
||||
return minio_client.presigned_get_object(
|
||||
bucket_name, object_name, expires=timedelta(seconds=3600)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from utils.GlobalVariable import LOCAL_IP
|
||||
|
||||
RABBIT_HOST = LOCAL_IP
|
||||
RABBIT_VHOST = "/bbit_ai"
|
||||
RABBIT_USER = "bbit_ai"
|
||||
RABBIT_VHOST = "bbit_ai"
|
||||
RABBIT_USER = "ai_lab"
|
||||
RABBIT_PASSWORD = "123456"
|
||||
QUEUE_NAME = "analysis_queue"
|
||||
|
||||
@@ -4,15 +4,15 @@ from uuid import UUID
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
import db.postgres as pg
|
||||
import utils.MyUtils as utils
|
||||
from agent.serviceAgent import get_service_agent_reply
|
||||
from config.security import get_user_id_from_token
|
||||
from llm.memLLM import take_memory
|
||||
from llm.titleChain import get_title
|
||||
from models.BaseResponse import BaseResponse
|
||||
from models.ChatRequest import ChatRequest
|
||||
|
||||
serviceRouter = APIRouter()
|
||||
from llm.titleChain import get_title
|
||||
from agent.serviceAgent import get_service_agent_reply
|
||||
from llm.memLLM import take_memory
|
||||
import utils.MyUtils as utils
|
||||
|
||||
|
||||
# 对话列表
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import uuid
|
||||
from uuid import UUID
|
||||
|
||||
from fastapi import APIRouter, File, Form, Depends, Query
|
||||
|
||||
import db.postgres as pg
|
||||
from config.minIO import get_upload_token
|
||||
from config.security import get_user_id_from_token
|
||||
from llm.ticketLLM import *
|
||||
from models.BaseResponse import BaseResponse
|
||||
@@ -149,3 +151,10 @@ def getSilkwormCocoonAnalysisTasks(
|
||||
"items": items,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@visionRouter.post("/getIVASCUploadToken")
|
||||
def getIVASCUploadToken():
|
||||
# 生成唯一文件名,避免覆盖
|
||||
object_name = f"raw/{uuid.uuid4()}"
|
||||
return get_upload_token("video-sca", object_name)
|
||||
|
||||
Reference in New Issue
Block a user