diff --git a/cryptoai/routes/analysis.py b/cryptoai/routes/analysis.py index aeb0e9c..7df1f3c 100644 --- a/cryptoai/routes/analysis.py +++ b/cryptoai/routes/analysis.py @@ -22,7 +22,8 @@ class AnalysisHistoryRequest(BaseModel): router = APIRouter() -agent_token = 'app-pPtva2AdJ8hJzkBKu12ThWjD' +api_url = 'http://ai.meida.fit/v1' +agent_token = 'app-wHONyQlk26htYWXbVxtBHI2Y' @router.post("/analysis_history") async def analysis_history(request: AnalysisHistoryRequest, @@ -62,7 +63,7 @@ async def stop_streaming(request: StopStreamingRequest, current_user: dict = Depends(get_current_user), session: Session = Depends(get_db)): - url = f'https://mate.aimateplus.com/v1/chat-messages/{request.task_id}/stop' + url = f'{api_url}/chat-messages/{request.task_id}/stop' headers = { 'Authorization': f'Bearer {agent_token}', 'Content-Type': 'application/json' @@ -95,7 +96,7 @@ async def rename_conversation(conversation_id: str, current_user: dict = Depends(get_current_user), session: Session = Depends(get_db)): - url = f'https://mate.aimateplus.com/v1/conversations/{conversation_id}/name' + url = f'{api_url}/conversations/{conversation_id}/name' headers = { 'Authorization': f'Bearer {agent_token}', 'Content-Type': 'application/json' @@ -118,7 +119,7 @@ async def delete_conversation(conversation_id: str, current_user: dict = Depends(get_current_user), session: Session = Depends(get_db)): - url = f'https://mate.aimateplus.com/v1/conversations/{conversation_id}' + url = f'{api_url}/conversations/{conversation_id}' headers = { 'Authorization': f'Bearer {agent_token}', 'Content-Type': 'application/json' @@ -140,7 +141,7 @@ async def delete_conversation(conversation_id: str, async def get_conversations(current_user: dict = Depends(get_current_user), session: Session = Depends(get_db)): - url = 'https://mate.aimateplus.com/v1/conversations' + url = f'{api_url}/conversations' url = f'{url}?user={current_user["mail"]}&limit=5' headers = { 'Authorization': f'Bearer {agent_token}', @@ -170,7 +171,7 @@ async def get_conversation_messages(conversation_id: str, current_user: dict = Depends(get_current_user), session: Session = Depends(get_db)): - url = f'https://mate.aimateplus.com/v1/messages' + url = f'{api_url}/messages' headers = { 'Authorization': f'Bearer {agent_token}', 'Content-Type': 'application/json' @@ -217,7 +218,7 @@ async def chat(request: ChatRequest, if request.conversation_id: payload["conversation_id"] = request.conversation_id - url = 'https://mate.aimateplus.com/v1/chat-messages' + url = f'{api_url}/chat-messages' headers = { 'Authorization': f'Bearer {agent_token}', 'Content-Type': 'application/json' @@ -312,7 +313,7 @@ async def analysis(request: AnalysisRequest, raise HTTPException(status_code=400, detail="不支持的类型") - url = 'https://mate.aimateplus.com/v1/workflows/run' + url = f'{api_url}/workflows/run' headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'application/json' diff --git a/docker-compose.yml b/docker-compose.yml index 13ba3e6..7794e50 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: cryptoai-api: build: . container_name: cryptoai-api - image: cryptoai-api:0.1.40 + image: cryptoai-api:0.1.41 restart: always ports: - "8000:8000"