This commit is contained in:
aaron 2025-06-08 21:20:47 +08:00
parent 1eeb2c1bee
commit 7b34c59dfe
2 changed files with 10 additions and 9 deletions

View File

@ -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'

View File

@ -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"